sync

class advanced_alchemy.config.sync.SQLAlchemySyncConfig[source]

Bases: GenericSQLAlchemyConfig[Engine, Session, sessionmaker]

Sync SQLAlchemy Configuration.

create_engine_callable(**kwargs: Any) Engine

Callable that creates an AsyncEngine instance or instance of its subclass.

session_config: SyncSessionConfig

Configuration options for the sessionmaker.

session_maker_class

Sessionmaker class to use.

alias of sessionmaker

__init__(create_engine_callable: Callable[[str], Engine] = <function create_engine>, session_config: SyncSessionConfig = <factory>, session_maker_class: type[sessionmaker] = <class 'sqlalchemy.orm.session.sessionmaker'>, connection_string: str | None = None, engine_config: EngineConfig = <factory>, session_maker: Callable[[], SessionT] | None = None, engine_instance: EngineT | None = None, create_all: bool = False, metadata: MetaData | None = None, enable_touch_updated_timestamp_listener: bool = True, alembic_config: AlembicSyncConfig = <factory>) None
alembic_config: AlembicSyncConfig

Configuration for the SQLAlchemy Alembic migrations.

The configuration options are documented in the Alembic documentation.

class advanced_alchemy.config.sync.SyncSessionConfig[source]

Bases: GenericSessionConfig[Connection, Engine, Session]

class advanced_alchemy.config.sync.AlembicSyncConfig[source]

Bases: GenericAlembicConfig

Configuration for a Sync Alembic’s Config.

For details see: https://alembic.sqlalchemy.org/en/latest/api/config.html

__init__(script_config: str = 'alembic.ini', version_table_name: str = 'alembic_versions', version_table_schema: str | None = None, script_location: str = 'migrations', target_metadata: MetaData = MetaData(), user_module_prefix: str | None = 'sa.', render_as_batch: bool = True, compare_type: bool = False, template_path: str = '/home/runner/work/advanced-alchemy/advanced-alchemy/advanced_alchemy/alembic/templates') None