Expression Serializer Extension
Legacy Feature
The serializer extension is legacy and should not be used for new development.
Any SQLAlchemy query structure, either based on sqlalchemy.sql.* or sqlalchemy.orm.* can be used. The mappers, Tables, Columns, Session etc. which are referenced by the structure are not persisted in serialized form, but are instead re-associated with the query structure when it is deserialized.
Warning
The serializer extension uses pickle to serialize and deserialize objects, so the same security consideration mentioned in the python documentation apply.
Similar restrictions as when using raw pickle apply; mapped classes must be themselves be pickleable, meaning they are importable from a module-level namespace.
The serializer module is only appropriate for query structures. It is not needed for:
function sqlalchemy.ext.serializer.Deserializer(file, metadata=None, scoped_session=None, engine=None)
function sqlalchemy.ext.serializer.Serializer(*args, **kw)
function sqlalchemy.ext.serializer.dumps(obj, protocol=5)