Defines SQLAlchemy's system of class instrumentation.
This module is usually not directly visible to user applications, but defines a large part of the ORM's interactivity.
instrumentation.py deals with registration of end-user classes for state tracking. It interacts closely with state.py and attributes.py which establish per-instance and per-class-attribute instrumentation, respectively.
The class instrumentation system can be customized on a per-class
or global basis using the sqlalchemy.ext.instrumentation
module, which provides the means to build and specify
alternate instrumentation forms.
Class | ClassManager |
Tracks state information at the class level. |
Class | InstrumentationFactory |
Factory for new ClassManager instances. |
Function | is_instrumented |
Return True if the given attribute on the given instance is instrumented by the attributes package. |
Constant | DEL_ATTR |
Undocumented |
Class | _SerializeManager |
Provide serialization of a .ClassManager . |
Function | _generate_init |
Build an __init__ decorator that triggers ClassManager events. |
Function | register_class |
Register class instrumentation. |
Function | unregister_class |
Unregister class instrumentation. |
Variable | _instrumentation_factory |
Undocumented |
Return True if the given attribute on the given instance is instrumented by the attributes package.
This function may be used regardless of instrumentation applied directly to the class, i.e. no descriptors are required.