slitherway

Python wrapper for the Flyway CLI


Keywords
migrations, flyway
License
MIT
Install
pip install slitherway==0.1.1

Documentation

Slitherway

PyPi version

Slitherway is a lightweight python wrapper around the Flyway CLI.
It allows you to run migrations directly from your python applications and tests

In order to use, you must have the Flyway CLI installed on your machine!

Example

Using slitherway is simple

from slitherway.commands import migrate
from slitherway.models import FlywayCommandArgs

args = FlywayCommandArgs(
    user=pg.POSTGRES_USER,
    password=pg.POSTGRES_PASSWORD,
    locations=["migrations"],
    url=f"jdbc:postgresql://localhost:{pg.get_exposed_port(5432)}/{pg.POSTGRES_DB}",
)

migrate(args)