PageRenderTime 51ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/SQLAlchemy-0.7.8/examples/custom_attributes/__init__.py

#
Python | 8 lines | 5 code | 2 blank | 1 comment | 1 complexity | 013a5412de5e3ccc8ef3bdc92640f64f MD5 | raw file
  1. """
  2. Two examples illustrating modifications to SQLAlchemy's attribute management system.
  3. ``listen_for_events.py`` illustrates the usage of :class:`~sqlalchemy.orm.interfaces.AttributeExtension` to intercept attribute events. It additionally illustrates a way to automatically attach these listeners to all class attributes using a :class:`~sqlalchemy.orm.interfaces.InstrumentationManager`.
  4. ``custom_management.py`` illustrates much deeper usage of :class:`~sqlalchemy.orm.interfaces.InstrumentationManager` as well as collection adaptation, to completely change the underlying method used to store state on an object. This example was developed to illustrate techniques which would be used by other third party object instrumentation systems to interact with SQLAlchemy's event system and is only intended for very intricate framework integrations.
  5. """