module documentation

Undocumented

Class async_sessionmaker A configurable :class:`.AsyncSession` factory.
Class AsyncSession Asyncio version of :class:`_orm.Session`.
Class AsyncSessionTransaction A wrapper for the ORM :class:`_orm.SessionTransaction` object.
Function async_object_session Return the :class:`_asyncio.AsyncSession` to which the given instance belongs.
Function async_session Return the :class:`_asyncio.AsyncSession` which is proxying the given :class:`_orm.Session` object, if any.
Class _AsyncSessionContextManager Undocumented
Constant _EXECUTE_OPTIONS Undocumented
Constant _STREAM_OPTIONS Undocumented
Type Variable _AS Undocumented
Type Variable _T Undocumented
Type Alias _AsyncSessionBind Undocumented
def async_object_session(instance: object) -> Optional[AsyncSession]: (source)

Return the :class:`_asyncio.AsyncSession` to which the given instance belongs. This function makes use of the sync-API function :class:`_orm.object_session` to retrieve the :class:`_orm.Session` which refers to the given instance, and from there links it to the original :class:`_asyncio.AsyncSession`. If the :class:`_asyncio.AsyncSession` has been garbage collected, the return value is ``None``. This functionality is also available from the :attr:`_orm.InstanceState.async_session` accessor. :param instance: an ORM mapped instance :return: an :class:`_asyncio.AsyncSession` object, or ``None``. .. versionadded:: 1.4.18

def async_session(session: Session) -> Optional[AsyncSession]: (source)

Return the :class:`_asyncio.AsyncSession` which is proxying the given :class:`_orm.Session` object, if any. :param session: a :class:`_orm.Session` instance. :return: a :class:`_asyncio.AsyncSession` instance, or ``None``. .. versionadded:: 1.4.18

_EXECUTE_OPTIONS = (source)

Undocumented

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

Undocumented

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

Undocumented

Value
TypeVar('_AS',
        bound='AsyncSession')

Undocumented

Value
TypeVar('_T',
        bound=Any)
_AsyncSessionBind = (source)

Undocumented

Value
Union['AsyncEngine', 'AsyncConnection']