class documentation

A base class applied to all ORM objects and attributes that are related to things that can be returned by the :func:`_sa.inspect` function. The attributes defined here allow the usage of simple boolean checks to test basic facts about the object returned. While the boolean checks here are basically the same as using the Python isinstance() function, the flags here can be used without the need to import all of these classes, and also such that the SQLAlchemy class system can change while leaving the flags here intact for forwards-compatibility.

Class Variable __slots__ Undocumented
Class Variable is_aliased_class True if this object is an instance of :class:`.AliasedClass`.
Class Variable is_attribute True if this object is a Python :term:`descriptor`.
Class Variable is_bundle True if this object is an instance of :class:`.Bundle`.
Class Variable is_clause_element True if this object is an instance of :class:`_expression.ClauseElement`.
Class Variable is_instance True if this object is an instance of :class:`.InstanceState`.
Class Variable is_mapper True if this object is an instance of :class:`_orm.Mapper`.
Class Variable is_property True if this object is an instance of :class:`.MapperProperty`.
Class Variable is_selectable Return True if this object is an instance of :class:`_expression.Selectable`.
Class Variable _is_internal_proxy True if this object is an internal proxy object.
is_aliased_class: bool = (source)

True if this object is an instance of :class:`.AliasedClass`.

is_attribute: bool = (source)

True if this object is a Python :term:`descriptor`. This can refer to one of many types. Usually a :class:`.QueryableAttribute` which handles attributes events on behalf of a :class:`.MapperProperty`. But can also be an extension type such as :class:`.AssociationProxy` or :class:`.hybrid_property`. The :attr:`.InspectionAttr.extension_type` will refer to a constant identifying the specific subtype. .. seealso:: :attr:`_orm.Mapper.all_orm_descriptors`

is_bundle: bool = (source)

True if this object is an instance of :class:`.Bundle`.

is_clause_element: bool = (source)

True if this object is an instance of :class:`_expression.ClauseElement`.

is_instance: bool = (source)

True if this object is an instance of :class:`.InstanceState`.

is_mapper: bool = (source)

True if this object is an instance of :class:`_orm.Mapper`.

is_property: bool = (source)

True if this object is an instance of :class:`.MapperProperty`.

is_selectable: bool = (source)

Return True if this object is an instance of :class:`_expression.Selectable`.

_is_internal_proxy: bool = (source)

True if this object is an internal proxy object. .. versionadded:: 1.2.12