Flask-Alembic
Integrate Alembic with Flask.
What it is and what it does
Flask-Alembic is a Flask extension that wraps Alembic, the industry-standard database migration tool, and integrates it directly into Flask's configuration and CLI. Instead of managing separate alembic.ini and env.py files, Flask-Alembic reads settings from Flask.config and automatically discovers your SQLAlchemy models and database engines from Flask-SQLAlchemy, Flask-SQLAlchemy-Lite, or plain SQLAlchemy. It provides both command-line commands (via `flask db`) and Python functions you can call within your application context, letting you generate migrations, apply upgrades, and access Alembic's internal API without leaving your Flask codebase.
The package is designed for teams already using Flask and SQLAlchemy who need to version and deploy schema changes reliably. It handles single and multiple database templates, supports named migration branches, and exposes Alembic's full API for advanced use cases. The main trade-offs are that offline migrations and async engines are not yet supported, and the project is maintained by the Pallets Community Ecosystem rather than as a primary focus.
Use it for:
- Generate and apply database schema migrations automatically when deploying Flask applications with SQLAlchemy models.
- Manage multiple independent databases or migration branches within a single Flask application.
- Version control schema changes alongside application code using the `flask db` CLI during development.
- Programmatically create and apply migrations from within Flask application code during runtime.
- Transition from manual SQL scripts to tracked, reversible schema changes in existing Flask projects.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Flask-Alembic integrates Alembic database migrations into Flask applications, providing CLI commands and Python APIs to create, manage, and apply schema changes without writing raw SQL or configuration files.
Yes, if you are building a Flask application with SQLAlchemy and need reliable schema versioning. The low install friction, permissive license, recent maintenance, and integration with Flask's config system make it the natural choice for this use case. The aging maintenance status and lack of async/offline support are not blockers for typical Flask deployments, but verify those features are not required for your project.
Install
flask-alembic on PyPI
pip
pip install flask-alembicuv
uv add flask-alembicpoetry
poetry add flask-alembicInstalling Flask-Alembic
Before you install
Low friction install with three straightforward dependencies. Last release was recent (2025-11-17) and the project remains actively maintained, though classified as aging rather than actively developed.
License in practice
MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice.
Quickstart
pip install flask-alembic
from flask_alembic import Alembic
alembic = Alembic()
alembic.init_app(app)
# Then use: flask db revision "description"
# Or: alembic.revision('description') in app context
Requires Python 3.10 or later; requires a Flask application instance and SQLAlchemy models to be useful.
Verify before relying
- Whether the package works with async SQLAlchemy engines (description notes this is not currently supported).
- Current state of offline migration support (description notes this is not currently supported).
- Whether Flask-SQLAlchemy-Lite is actively maintained as an alternative to Flask-SQLAlchemy.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — alembic, flask, sqlalchemy |
| Maintenance | aging — 270 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 110,807/month — #12,443 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flask_alembic-3.2.0-py3-none-any.whl
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
Flask-MigrateFlask-Migrate handles SQLAlchemy database…
permissive · top 5,000 on PyPI
Flask-SQLAlchemyFlask-SQLAlchemy integrates SQLAlchemy database…
permissive · top 1,000 on PyPI
starrocksProvides a SQLAlchemy dialect and Alembic…
permissive · top 15,000 on PyPI
alembicAlembic generates and manages database schema…
permissive · top 1,000 on PyPI
pytest-alembicA pytest plugin that runs built-in and custom…
permissive · top 5,000 on PyPI
alembic_utilsExtends Alembic to autogenerate database…
permissive · top 5,000 on PyPI
alembic-autogenerate-enumsExtends Alembic's autogenerate to detect and…
permissive · top 15,000 on PyPI
sqlalchemy-migrateProvides database schema migration management…
permissive · top 15,000 on PyPI
alembic-postgresql-enumExtends Alembic to automatically detect and…
permissive · top 5,000 on PyPI
atlas-provider-sqlalchemyConnects SQLAlchemy models to Atlas to…
unclear · top 15,000 on PyPI