Skip to main content

A CLI tool for publishing Python packages to PyPI

Project description

pypublish-cli

A CLI tool for publishing Python packages to PyPI.

Installation

pip install pypublish-cli

Usage

Initialize GitHub repository

pypublish --init-repo              # Use current directory name as repo name
pypublish --init-repo myproject    # Specify custom repo name
pypublish --init-repo --private    # Create private repository

This will:

  1. Initialize git repository (if not already initialized)
  2. Add all files and create initial commit
  3. Create GitHub repository using gh CLI
  4. Push to GitHub

Full publish workflow

pypublish 0.2.0              # Full publish: tag, build, upload
pypublish v0.2.0             # Full publish: tag, build, upload

This will:

  1. Create a git tag
  2. Push the tag to origin
  3. Clean up old build artifacts
  4. Build the package using python -m build
  5. Upload to PyPI using twine

Partial workflows

pypublish 0.2.0 --tag-only         # Only create and push tag
pypublish 0.2.0 --build-only       # Tag and build, don't upload
pypublish 0.2.0 --no-build         # Tag and upload existing dist/
pypublish 0.2.0 --no-upload        # Tag and build, don't upload

Delete a tag

pypublish --delete-tag 0.2.0       # Delete tag locally and from origin
pypublish --delete-tag v0.2.0      # Delete tag locally and from origin

This will remove the tag both locally and from the remote repository.

Requirements

  • Python >= 3.7
  • Git repository
  • PyPI account configured with twine

License

MIT

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

pypublish_cli-0.1.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

pypublish_cli-0.1.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file pypublish_cli-0.1.1.tar.gz.

File metadata

  • Download URL: pypublish_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for pypublish_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 08b2d7de67b82a4b292320d5c18027a0804abd4fc3bf27a6ee2b72d316169d78
MD5 5ee8d86d07f9ce16fbe3f7cc2d0b691f
BLAKE2b-256 c59d65af9f79d14eb2ea63d9fe7609ea40aa67564714a14eb1cea8c2f1d0ec3d

See more details on using hashes here.

File details

Details for the file pypublish_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pypublish_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for pypublish_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1c2766baf990a2323ef2b548b1b3a87699525967d098c9d83b6664a3044c0eda
MD5 32227eedfef21bf0daf6158f6a152e7e
BLAKE2b-256 5c21534e0eca5a856c08cb4c250a91776b4c78ff89b996fb9cdb43613a98bd46

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