module documentation

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 ​Class​Manager Tracks state information at the class level.
Class ​Instrumentation​Factory 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 _​Serialize​Manager 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
def is_instrumented(instance, key):

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.

DEL_ATTR =

Undocumented

Value
util.symbol('DEL_ATTR')
def _generate_init(class_, class_manager, original_init):
Build an __init__ decorator that triggers ClassManager events.
def register_class(class_, finalize=True, mapper=None, registry=None, declarative_scan=None, expired_attribute_loader=None, init_method=None):

Register class instrumentation.

Returns the existing or newly created class manager.

def unregister_class(class_):
Unregister class instrumentation.
_instrumentation_factory =

Undocumented