Skip to main content

Flask extension to integrate Alembic migrations

Project description

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

Full documentation

Installation

Install releases from PyPI:

pip install Flask-Alembic

Install the latest code from BitBucket:

pip install https://bitbucket.org/davidism/flask-alembic/get/default.tar.gz

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()
alembic.init_app(app)

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

# Upgrade the database
alembic.upgrade()

# 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 manage.py db --help

Project details


Release history Release notifications

This version
History Node

2.0.1

History Node

2.0.0

History Node

1.2.1

History Node

1.2

History Node

1.1.1

History Node

1.1

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

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 Sep 1, 2016
Flask-Alembic-2.0.1.tar.gz (16.4 kB) Copy SHA256 hash SHA256 Source None Sep 1, 2016

Supported by

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