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


Download files

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

Source Distribution

Flask-Alembic-2.0.1.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

Flask_Alembic-2.0.1-py2.py3-none-any.whl (10.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file Flask-Alembic-2.0.1.tar.gz.

File metadata

File hashes

Hashes for Flask-Alembic-2.0.1.tar.gz
Algorithm Hash digest
SHA256 05a1e6f4148dbfcc9280a393373bfbd250af6f9f4f0ca9f744ef8f7376a3deec
MD5 0b7ba30687df4bc868a5b177d1065b30
BLAKE2b-256 094d6cf6182051bd31177ec5612eec3b211af0a3880e82a4e6137b6d1518593b

See more details on using hashes here.

File details

Details for the file Flask_Alembic-2.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for Flask_Alembic-2.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7e67740b0b08d58dcae0c701d56b56e60f5fa4af907bb82b4cb0469229ba94ff
MD5 79118df5e3be15e3f90c33ee95768dc6
BLAKE2b-256 c4fc63f9bccffbde7c303fe2958e6b54b4cdf8e0cb94c37b197362e1ef860230

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page