Skip to content

bunpy publish

bunpy publish [flags]

Description

Builds a wheel from pyproject.toml and uploads it to PyPI (or a compatible index). Requires a PyPI API token.

Flags

FlagDefaultDescription
--token <tok>$PYPI_TOKENPyPI API token
--index <url>PyPIUpload URL
--dry-runoffBuild the wheel but don’t upload
--help, -hPrint help

Examples

Publish using an environment variable:

export PYPI_TOKEN=pypi-...
bunpy publish

Dry run to check the wheel:

bunpy publish --dry-run

Publish to a private index:

bunpy publish --index https://pypi.mycompany.com/legacy/ --token $PRIVATE_TOKEN

Errors

If no token is provided and $PYPI_TOKEN is not set, bunpy exits with an error. Use --dry-run to test the build without credentials.