module documentation

Undocumented

Class ​Async​Session Asyncio version of _orm.Session.
Class ​Async​Session​Transaction A wrapper for the ORM _orm.SessionTransaction object.
Class _​Async​Session​Context​Manager Undocumented
Function async​_object​_session Return the _asyncio.AsyncSession to which the given instance belongs.
Function async​_session Return the _asyncio.AsyncSession which is proxying the given _orm.Session object, if any.
Constant ​_EXECUTE​_OPTIONS Undocumented
Constant ​_STREAM​_OPTIONS Undocumented
def async_object_session(instance):

Return the _asyncio.AsyncSession to which the given instance belongs.

This function makes use of the sync-API function _orm.object_session to retrieve the _orm.Session which refers to the given instance, and from there links it to the original _asyncio.AsyncSession.

If the _asyncio.AsyncSession has been garbage collected, the return value is None.

This functionality is also available from the _orm.InstanceState.async_session accessor.

New in version 1.4.18.
Parameters
instancean ORM mapped instance
Returns
an _asyncio.AsyncSession object, or None.
def async_session(session):

Return the _asyncio.AsyncSession which is proxying the given _orm.Session object, if any.

New in version 1.4.18.
Parameters
sessiona _orm.Session instance.
Returns
a _asyncio.AsyncSession instance, or None.
_EXECUTE_OPTIONS =

Undocumented

Value
util.immutabledict({'prebuffer_rows': True})
_STREAM_OPTIONS =

Undocumented

Value
util.immutabledict({'stream_results': True})