Skip to main content

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.

Installation

Use pip to install Nomade:

$ pip install nomade

Quick Start

Initialize a Nomade project:

$ nomade init

It will create the following project structure:

.
├── nomade
│   ├── template.py.j2
│   └── migrations
└── pyproject.toml

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

[tool.nomade]
migrations = "nomade/migrations"
template = "nomade/template.py.j2"
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]...

Options:
  --help  Show this message and exit.

Commands:
  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.

Release files for nomade 1.0.0

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

Source distribution (sdist)

Source distribution for nomade 1.0.0
File Size Uploaded
nomade-1.0.0.tar.gz 14.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nomade 1.0.0
File Interpreter ABI Platform
nomade-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.2 kB

Release files / nomade-1.0.0.tar.gz

Download URL nomade-1.0.0.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f7f204e282401dc807960ec1d94e0f5bcc2ae7a7f5aa5d735845ddd42ef7481f
BLAKE2b-256 checksum
How to use checksums
c5b6b9e8752c806e50a7d873b949a2ccd244ea12365e5f695f1dc5d21e9fa7c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.17 CPython/3.7.4 Linux/5.0.0-29-generic

Release files / nomade-1.0.0-py3-none-any.whl

Download URL nomade-1.0.0-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d8809f7c81c706c5832529506731ff3bff5fb47694e64872a5d265223a3537a
BLAKE2b-256 checksum
How to use checksums
0fcf16d79aedb7911dbb3db838861c5d5e0282a91a6d83bd3d812a95cc41b8d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.17 CPython/3.7.4 Linux/5.0.0-29-generic

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.0.1

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