Skip to main content

Flask-DbMigrant

Flask extension for working with Alembic.

It can be used as an alternative for Flask-Migrate. It depends only on Flask and Alembic.

Installation

$ pip install Flask-DbMigrant

Usage

First create the dbmigrant object:

from flask_dbmigrant import DbMigrant
dbmigrant = DbMigrant()

Then initialize it using init_app method:

dbmigrant.init_app(app)  # app is your Flask app instance

The Flask app config should have CONFIG_MODULE and DB_MODULE keys.

CONFIG_MODULE is a name of the module from which DATABASE_URL is to be imported (DATABASE_URL is a connection string that tells what database to connect to).

DB_MODULE is a name of the module from which database models and metadata are to be imported.

Existing commands

  • flask db init

    create a migration repository and configure the environment

  • flask db migrate

    create a migration script

  • flask db upgrade

    execute the script

License

Flask-DbMigrant was created by Rafal Padkowski. It is licensed under the terms of the MIT license.

Metadata

Release files for flask-dbmigrant 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flask-dbmigrant 1.0.3
File Size Uploaded
flask_dbmigrant-1.0.3.tar.gz 2.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flask-dbmigrant 1.0.3
File Interpreter ABI Platform
flask_dbmigrant-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 5.9 kB

Release files / flask_dbmigrant-1.0.3.tar.gz

Download URL flask_dbmigrant-1.0.3.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6e8a5f628757a8d4f9593a33969c9e5fa97c255c81710659de754e2221cbe19b
BLAKE2b-256 checksum
How to use checksums
dba20b966202925dc98e9d603988a67a1968a7dbf421973c5d0c8f4ceac8cdbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.12 Linux/5.15.0-79-generic

Release files / flask_dbmigrant-1.0.3-py3-none-any.whl

Download URL flask_dbmigrant-1.0.3-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da8ff1b3a7c7c6f7dc650aeb831af94d3323497abdeeccd39f4ccaaaa5845151
BLAKE2b-256 checksum
How to use checksums
1a2a38829ec5761d092da0166c5c86814ddf454f400290344adb40104f3dcba3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.12 Linux/5.15.0-79-generic

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page