Skip to main content

Local-first release CLI tools: ship_bump, ship_pypi, ship_release_gh

Project description

fastship

Tiny, local-first release tools for modern Python projects.

fastship gives you the same workflow feel as the nbdev nbdev_bump_version, release_pypi, and release_gh commands — but for plain (non-notebook) Python projects.

Install

pip install fastship

Quick start

Create a new project:

ship_new my-project
cd my-project
python -m venv .venv && . .venv/bin/activate
pip install -e .[dev]

This creates a complete project with pyproject.toml, __version__, LICENSE, README, and everything wired for fastship.

Commands

ship_bump

Bump a version part (0=major, 1=minor, 2=patch):

ship_bump --part 2
ship_bump --part 1
ship_bump --part 0

Decrement instead:

ship_bump --part 2 --unbump

ship_pypi

Build + upload to PyPI:

ship_pypi

Upload to a named repository in ~/.pypirc (e.g. testpypi):

ship_pypi --repository testpypi

Quiet mode:

ship_pypi --quiet

ship_release_gh

This is an interactive helper:

  1. Creates/updates CHANGELOG.md from closed GitHub issues since your last GitHub release
  2. Opens your $EDITOR (defaults to nano) so you can edit the changelog
  3. Prompts you to confirm
  4. Runs git commit -am release, git push
  5. Creates a GitHub release tagged with your current __version__
ship_release_gh

GitHub token setup

ship_release_gh looks for a token in this order:

  1. FASTSHIP_TOKEN
  2. a ./token file in your repo root
  3. GITHUB_TOKEN

The token must have permission to create releases (typically repo scope for classic PATs, or appropriate fine-grained permissions).

Notes

  • ship_pypi does not bump your version for you — keep it explicit and boring.
  • ship_release_gh requires that your project has a git origin remote pointing at GitHub (or use --repo OWNER/REPO).

Existing projects

To add fastship to an existing project:

1) Put your version in __init__.py

In your package's main __init__.py:

__version__ = "0.0.1"

2) Configure pyproject.toml

[project]
name = "my-project"
dynamic = ["version"]

[tool.setuptools.dynamic]
version = { attr = "my_project.__version__" }

Keep __version__ = "x.y.z" as a simple literal (don't compute it). ship_bump will rewrite this line near the top of the file to keep builds happy.

3) Optional: specify branch

Fastship infers your package name from [project].name (changing - to _). To override the release branch:

[tool.fastship]
branch = "main"  # defaults to current git branch

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

fastship-0.0.2.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastship-0.0.2-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file fastship-0.0.2.tar.gz.

File metadata

  • Download URL: fastship-0.0.2.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for fastship-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d186a7445aba45b75a9a9daf926d83652ec38eef27e17646de71ef2ae6ec7ee4
MD5 cd19c696512e48d3312a3791e7e5ff07
BLAKE2b-256 c44affaf3ba6a422dd12fee5cf80209d2af8ca343421faab3a73496abb08816f

See more details on using hashes here.

File details

Details for the file fastship-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: fastship-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for fastship-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7df561b078575ffecad57c64782eadf0bf8be109244835bb2706ec3e35292ac5
MD5 4e4771e32fa02b80a29c5a8579144aa7
BLAKE2b-256 f8521cc9dcc89d5c8b821e2dddb759e3a41fd9dfc0a17867a9b4926be64f5d24

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page