asyncio¶
- class advanced_alchemy.config.asyncio.AlembicAsyncConfig[source]¶
Bases:
GenericAlembicConfig
Configuration for an Async Alembic’s Config class.
- __init__(script_config='alembic.ini', version_table_name='alembic_versions', version_table_schema=None, script_location='migrations', user_module_prefix='sa.', render_as_batch=True, compare_type=False, template_path='/home/runner/work/advanced-alchemy/advanced-alchemy/advanced_alchemy/alembic/templates')¶
- class advanced_alchemy.config.asyncio.AsyncSessionConfig[source]¶
Bases:
GenericSessionConfig
[AsyncConnection
,AsyncEngine
,AsyncSession
]SQLAlchemy async session config.
- sync_session_class¶
A
Session
subclass or other callable which will be used to construct theSession
which will be proxied. This parameter may be used to provide customSession
subclasses. Defaults to theAsyncSession.sync_session_class
class-level attribute.alias of
Empty
- __init__(autobegin=<class 'advanced_alchemy.utils.dataclass.Empty'>, autoflush=<class 'advanced_alchemy.utils.dataclass.Empty'>, bind=<class 'advanced_alchemy.utils.dataclass.Empty'>, binds=<class 'advanced_alchemy.utils.dataclass.Empty'>, class_=<class 'advanced_alchemy.utils.dataclass.Empty'>, expire_on_commit=<class 'advanced_alchemy.utils.dataclass.Empty'>, info=<class 'advanced_alchemy.utils.dataclass.Empty'>, join_transaction_mode=<class 'advanced_alchemy.utils.dataclass.Empty'>, query_cls=<class 'advanced_alchemy.utils.dataclass.Empty'>, twophase=<class 'advanced_alchemy.utils.dataclass.Empty'>, sync_session_class=<class 'advanced_alchemy.utils.dataclass.Empty'>)¶
- class advanced_alchemy.config.asyncio.SQLAlchemyAsyncConfig[source]¶
Bases:
GenericSQLAlchemyConfig
[AsyncEngine
,AsyncSession
,async_sessionmaker
[AsyncSession
]]Async SQLAlchemy Configuration.
Note
The alembic configuration options are documented in the Alembic documentation.
- create_engine_callable(**kw)¶
Callable that creates an
AsyncEngine
instance or instance of its subclass.- Return type:
sqlalchemy.ext.asyncio.AsyncEngine
- session_config: AsyncSessionConfig¶
Configuration options for the
async_sessionmaker
.
- session_maker_class¶
Sessionmaker class to use.
alias of
async_sessionmaker
- __init__(create_engine_callable=<function create_async_engine>, session_config=<factory>, session_maker_class=<class 'sqlalchemy.ext.asyncio.session.async_sessionmaker'>, connection_string=None, engine_config=<factory>, session_maker=None, engine_instance=None, create_all=False, metadata=None, enable_touch_updated_timestamp_listener=True, bind_key=None, alembic_config=<factory>)¶
- alembic_config: AlembicAsyncConfig¶
Configuration for the SQLAlchemy Alembic migrations.
The configuration options are documented in the Alembic documentation.