Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Flask extension to integrate Alembic migrations

Project description

This Flask extension provides a configurable Alembic migration environment around a Flask-SQLAlchemy database.

Full documentation


Install releases from PyPI:

pip install Flask-Alembic

Install the latest code from BitBucket:

pip install

Basic Usage

You’ve created a Flask application and some models with Flask-SQLAlchemy. Now start using Flask-Alembic:

from flask_alembic import Alembic

# Intialize the extension
alembic = Alembic()

# Auto-generate a migration
alembic.revision('making changes')

# Upgrade the database

# Access the internals
environment_context = alembic.env

Commands are included for Click (Flask 0.11, or Flask-CLI):

$ flask db revision "making changes"
$ flask db upgrade

and Flask-Script:

$ python db --help

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
Flask_Alembic-2.0.1-py2.py3-none-any.whl (10.6 kB) Copy SHA256 hash SHA256 Wheel 3.5
Flask-Alembic-2.0.1.tar.gz (16.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page