SQLAlchemy and Dependency ConfigurationΒΆ

Configures SQLAlchemy, Alembic, and the database session dependency injection.

DatabaseSession

FastAPI dependency for providing and managing the async database session lifecycle.

alias of Annotated[AsyncSession, Depends(dependency=_get_session, use_cache=True, scope=None)]

alchemy : AdvancedAlchemy

AdvancedAlchemy extension managing engine, session factory, and Alembic integration.

sqlalchemy_config : SQLAlchemyAsyncConfig

Central SQLAlchemy configuration with async engine, autocommit mode, and Alembic details.