SQLAlchemy and Dependency Configuration

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

alchemy: AdvancedAlchemy

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

sqlalchemy_config

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

app.config.app_settings.DatabaseSession = Annotated[AsyncSession, Depends(alchemy.provide_session())]

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