Overview

flask_locust

flask_locust provides easy-to-use Migrations for SQL applications.

Usage:

import yourapp
import flask_locust

app = yourapp.application_factory()

class Locust(flask_locust.Blueprint):
    def get_migrations_path(self):
        return 'path/to/migrations'

    def commit(self):
        mydb.commit()

    def execute_sql(self, sql, *args):
        return mydb.execute(sql, args)

app.register_blueprint(Locust(), '/migrations')

app.run()

# Now go to http://localhost/migrations to execute the migrations