Registry / database / alembic-git-revisions

alembic-git-revisions

JSON →
library6pypypi✓ verified 80d ago

Alembic extension that automatically chains migration revisions based on git commit history, replacing manual dependency specification. Current version 6, requires Python >=3.11. Release cadence is irregular.

pip install alembic-git-revisions
INSTALL
IMPORT
SIG · ALEMBIC-GIT-REVISI
A
alembic-git-revisions
databasepythonv6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

build_chain
from alembic_git_revisions import build_chain
from alembic_git_revisions import GitRevisionPlugin
generate_chain_file
from alembic_git_revisions import generate_chain_file
get_down_revision
from alembic_git_revisions import get_down_revision

Initialize the plugin with an Alembic Config object.

from alembic.config import Config from alembic_git_revisions import GitRevisionPlugin import os config = Config() config.set_main_option('script_location', 'migrations') git_plugin = GitRevisionPlugin() git_plugin.setup(config) print('Alembic git revisions plugin initialized.')
alembic --version
Debug
Known issues
deprecatedUsing standard `alembic revision --autogenerate` without GitAlembicCommand may cause broken revision chains.
fix
Always use the provided `GitAlembicCommand` subclass or invoke via the plugin's command wrapper.
affects: all
gotchaThe plugin requires a clean git working tree (no uncommitted changes) to generate revision dependencies.
fix
Commit or stash changes before running migration commands.
affects: all
breakingVersion 6 drops support for Python <3.11. Older Python versions will fail to install.
fix
Upgrade to Python 3.11+.
affects: >=6
Upgrade
Version history
6latest on PyPI · released Mar 31, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
42 hits · last 30 days
node
36
OpenAI (training)
1
Resources
alembic-git-revisions — pip install alembic-git-revisions · libregistry