Skip to main content

Migration Manager for Humans

Project description

Nomade Logo

Python Migration Manager for Humans :camel:

Nomade is a simple migration manager tool that aims to be easy to integrate with any ORM (e.g. SQLAlchemy, Peewee, Pony) and database (e.g. SQLite, MySQL, PostgreSQL). It is basically a command-line interface (CLI) tool that manages migrations (Python files) by applying changes to the database schema and storing the current migration ID.

This tool was inspired by alembic (if you are using SQLAlchemy as ORM you should consider using alembic).

Note: this project is still under development so you may find bugs. If you find any bug, feel free to contribute by creating an issue and/or submitting a PR to fix it.


Use pip to install Nomade:

$ pip install nomade

Quick Start

Initialize a Nomade project:

$ nomade init

It will create the following project structure:

├── nomade
│   ├──
│   └── migrations
└── pyproject.toml

Define Nomade settings in the pyproject.toml file, for example:

migrations = "nomade/migrations"
template = "nomade/"
connection-string = "sqlite:///nomade.db"
date-format = "%d/%m/%Y"
name-format = "{date}_{time}_{id}_{slug}"

Then, create your first migration:

$ nomade migrate "Create first table"

Implement the upgrade and downgrade functions in the migration file.

Then apply the migration to the database:

$ nomade upgrade head

To discover more Nomade features please read the documentation or call for help:

$ nomade --help

Usage: nomade [OPTIONS] COMMAND [ARGS]...

  --help  Show this message and exit.

  current    Show the current migration.
  downgrade  Downgrade migrations.
  history    Show migrations history.
  init       Init a Nomade project.
  migrate    Create a new migration.
  stamp      Stamp a specific migration to the database.
  upgrade    Upgrade migrations.
  version    Show Nomade version.

How to Contribute

  • Check for open issues or open a fresh one to start a discussion around a feature idea or a bug.
  • Become more familiar with the project by reading the Contributor's Guide.

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

nomade-1.0.0.tar.gz (14.0 kB view hashes)

Uploaded source

Built Distribution

nomade-1.0.0-py3-none-any.whl (15.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page