Enter search terms or a module, class or function name.
SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL.
PyAMF 0.4 and newer includes an adapter for decoding/encoding objects managed by SQLAlchemy. The adapter is enabled by default, and SQLAlchemy managed objects are transparently encoded/decoded by the adapter.
To use the adapter, make sure any SQLAlchemy managed classes are mapped before assigning an AMF alias for the class.
# MUST COME FIRST sqlalchemy.orm.mapper(MappedClass, mapped_table) # MUST COME LATER pyamf.register_class(MappedClass, 'mapped_class_alias')
The adapter adds 2 additional attributes to all encoded objects that are managed by SQLAlchemy.
encoded object (analogous to mapper.primary_key_from_instance(obj) in Python)
loaded from the database
The additional information contained in these attributes can be used to lazy load attributes in the client.
PyAMF also provides support for the excellent Elixir library, a thin wrapper, which provides the ability to create simple Python classes that map directly to relational database tables (this pattern is often referred to as the Active Record design pattern)