Skip to main content

puba

Safe Python package release CLI.

Check, build and publish Python packages to PyPI from one command.

Install

From the project folder:

python3 -m venv .venv
.venv/bin/pip install -e .

This also installs keyring, build and twine.

Optional tools, used if installed:

Usage

1. Store your PyPI token (one time)

puba auth

The token is saved in your system keyring (macOS Keychain, Windows Credential Manager, or a Linux keyring backend).

2. Run the safety checks

puba checks

This:

  1. Makes sure build and twine are installed (offers to install them if not)
  2. Fails if the git working directory has uncommitted changes
  3. Scans for secrets with gitleaks (skipped if not installed)
  4. Runs pytest (skipped if not installed or no tests are found)
  5. Builds the package into dist/

Nothing is uploaded.

3. Publish

puba publish          # run the checks, build and upload to PyPI
puba publish --test   # upload to TestPyPI instead
puba publish --dry    # run the checks and build, but don't upload

Help

puba help

Token lookup

When publishing, the token is taken from, in order:

  1. The PYPI_TOKEN environment variable
  2. The system keyring (saved with puba auth)
  3. A prompt

The same token is used for PyPI and TestPyPI.

CI

export PYPI_TOKEN=pypi-xxxxxxxxxxxx
puba publish

License

MIT

Metadata

Release files for puba 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 puba 1.0.0
File Size Uploaded
puba-1.0.0.tar.gz 4.1 kB Details

Built distribution (wheel)

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

Total release size: 10.2 kB

Release files / puba-1.0.0.tar.gz

Download URL puba-1.0.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
222a62ce30a99525f56fcccbbeca03f82cb57ceaf4841bcf248fc5686443d473
BLAKE2b-256 checksum
How to use checksums
637bc03973a0c46be6526e8b1f4e0017e0a547acafc79a463d19af3756f311d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

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

Download URL puba-1.0.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5b0b4bd07e3bd88d1357b8b6913f22e4532836f02b1262842184fcd4eb7fa57
BLAKE2b-256 checksum
How to use checksums
7ce99e875787c99ce7dfaf4a0080a645dd4111658eba41493cc0e8c414ca37e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

Release history Release notifications | RSS feed

This release

1.0.0 This release

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