Session API¶
Session and sessionmaker()¶
Session Utilities¶
Attribute and State Management Utilities¶
These functions are provided by the SQLAlchemy attribute instrumentation API to provide a detailed interface for dealing with instances, attribute values, and history. Some of them are useful when constructing event listener functions, such as those described in ORM Events.
| Object Name | Description |
|---|---|
Return the |
- function sqlalchemy.orm.attributes.instance_state()¶
Return the
InstanceStatefor a given mapped object.This function is the internal version of
object_state(). Theobject_state()and/or theinspect()function is preferred here as they each emit an informative exception if the given object is not mapped.