alembic
A database migration tool for SQLAlchemy.
Decision gist · record as of 2026-08-14
Yes. Alembic is the standard migration tool for SQLAlchemy projects, actively maintained, widely used (top 1000 on PyPI), and has no known vulnerabilities. Install it if you use SQLAlchemy and need to version-control schema changes; skip it only if you manage migrations manually or use a different ORM entirely.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; a SQLAlchemy-compatible database and SQLAlchemy itself must be installed and configured.
- Low friction: pure Python wheel with four runtime dependencies (SQLAlchemy, Mako, typing-extensions, tomli).
- Active maintenance with a release 6 days ago and consistent commit activity.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal obligations.
last release 2026-08-08 (6 days) · last repo commit 2026-08-12 · 4,320 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 215,238,109 downloads/mo, #191 on PyPI
Alternatives
Verify before relying
pip install alembic
alembic init myapp
alembic revision --autogenerate -m "add users table"
alembic upgrade head- Whether auto-generation accuracy varies significantly across different database backends beyond SQLite.
- Performance characteristics when managing migrations for very large schemas or long migration histories.
What it is and what it does
Alembic is a database migrations framework for SQLAlchemy applications that manages schema versioning and change tracking. It lets you write migration scripts that describe how to upgrade or downgrade your database schema, then execute them in sequence. The tool supports auto-generating migration scripts by comparing your current SQLAlchemy models to the database state, though you typically review and refine the generated scripts before applying them.
The package handles both direct database execution and SQL script generation (useful when DBAs need to review DDL before production deployment). It uses a directed-acyclic graph versioning model so migrations can branch and merge. For SQLite, which lacks native ALTER support, Alembic provides a "batch" mode that recreates tables with the needed changes. Runtime dependencies are SQLAlchemy (for schema inspection and DDL generation), Mako (for script templating), typing-extensions, and tomli (for configuration parsing).
Use it for
- Track and apply incremental schema changes in a team environment where multiple developers modify the database model.
- Generate initial migration scripts from an existing SQLAlchemy ORM model, then refine them before deployment.
- Safely test schema changes in development using transactional DDL rollback on databases like PostgreSQL.
- Produce SQL scripts for DBAs to review and execute on production databases where direct Python access is restricted.
- Manage complex schema evolution with branching migrations when parallel feature development requires different schema paths.
- Handle SQLite schema modifications through batch mode when direct ALTER TABLE is unavailable.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Alembic is the standard migration tool for SQLAlchemy projects, actively maintained, widely used (top 1000 on PyPI), and has no known vulnerabilities. Install it if you use SQLAlchemy and need to version-control schema changes; skip it only if you manage migrations manually or use a different ORM entirely.
Install
alembic on PyPI
Before you install
Low friction: pure Python wheel with four runtime dependencies (SQLAlchemy, Mako, typing-extensions, tomli). Active maintenance with a release 6 days ago and consistent commit activity.
Requires Python 3.10 or later; a SQLAlchemy-compatible database and SQLAlchemy itself must be installed and configured.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal obligations.
Quickstart
pip install alembic
alembic init myapp
alembic revision --autogenerate -m "add users table"
alembic upgrade head
Verify before relying
- Whether auto-generation accuracy varies significantly across different database backends beyond SQLite.
- Performance characteristics when managing migrations for very large schemas or long migration histories.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesSQLAlchemyMakotyping-extensionstomli |
| Maintenance | Actively maintained 6 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 215,238,109 / month, #191 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Database :: Front-Ends |
Evidence: alembic-1.19.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sqlalchemy migrations tool”
- alembicAlembic generates and manages database schema migrations for…
- sqlalchemy-migrateProvides database schema migration management for SQLAlchemy…
- Flask-AlembicFlask-Alembic integrates Alembic database migrations into Flask…
Give your agent the search over MCP, or paste the wish link into any chat.
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object Relational Mapper (ORM) that provides both a high-level ORM layer for declarative object persistence and a Core SQL construction system for direct database abstraction and query building.
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
A Python client library for connecting to and querying Weaviate, a vector database that enables semantic search and AI-powered data retrieval.
A Python client library that connects to Databricks clusters and SQL warehouses using a Thrift-based protocol, conforming to the Python DB API 2.0 specification and supporting Arrow-based data exchange.
Install it if you need to query Databricks clusters or SQL warehouses from Python.
Psycopg 3 is a PostgreSQL database adapter for Python that enables applications to connect to, query, and manage PostgreSQL databases using Python code.
Install it if you need to connect Python to PostgreSQL.
asyncpg is an asyncio-native PostgreSQL client library that executes queries asynchronously over the PostgreSQL binary protocol, enabling non-blocking database access in async Python applications.
See also alembic_utils · mongodb-migrations · pytest-alembic · atlas-provider-sqlalchemy · migra · Flask-Migrate · sqlalchemy-migrate · aerich · Flask-Alembic · clickhouse-migrations