Shipped a standard `npm publish` workflow with one click for Python packages
Project description
quick-publish
Shipped a standard publish workflow with one click for Python packages.
Note: This is the Python version of the popular npm package. It provides the same streamlined publishing experience for Python packages.
Motivation
As a maintainer for a large number of Python packages, it will be very cumbersome if you manually input the semantic version, generate changelog, git and PyPI tag etc. This tooling is to help you do all these things with one click.
Features
- Semantic version selection with interactive prompts
- Create git tag and push to remote
- Generate or update
CHANGELOG.mdfrom conventional commits - Update version in
pyproject.toml - Build package for distribution
- Full integration with modern Python packaging standards (PEP 517/518/621)
Install
Using pip (recommended for users)
pip install quick-publish # Global installation
pip install quick-publish -D # Local development installation
Using uv (recommended for developers)
# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and install from source
git clone https://github.com/quick-publish/quick-publish-py.git
cd quick-publish-py
uv sync --dev
# Run the CLI
uv run publish
Usage
For Python Projects
Create a one-click release flow:
publish
For NPM Projects (Original Use Case)
If you're working with NPM projects and want to use the original version:
npm i quick-publish -g
publish
Command Options
Usage: publish [OPTIONS]
Shipped a standard `publish` workflow with one click.
Options:
--depcost Generate or update `DEPCOST.md`, defaults to `false`
--push Execute git push & tag push to remote git origin, defaults to `true`
--dry-run Show what would be done without making changes
--version TEXT Specify version directly instead of interactive selection
-v, --verbose Enable verbose output
-h, --help Display this message
Examples
Interactive version selection
$ publish
Current version: 1.2.3
Select next version:
❯ 1.2.4 (patch)
1.3.0 (minor)
2.0.0 (major)
Custom version
Dry run to preview changes
publish --dry-run --verbose
Specify version directly
publish --version 2.0.0
Skip git push
publish --no-push
How It Works
- Version Selection: Interactively selects next semantic version or uses provided override
- Update Files: Updates version in
pyproject.tomland generatesCHANGELOG.md - Git Operations: Commits changes, creates git tag, and pushes to remote
- Build: Builds the package using modern Python build tools
- Publish Prep: Prepares distribution files for PyPI upload
Requirements
- Python 3.8+
- Git repository initialized
pyproject.tomlwith[project]section (PEP 621 compliant)
Integration with NPM Projects
This Python version maintains compatibility with the original npm workflow. If you're managing mixed Python/NPM projects:
# For Python packages
pip install quick-publish
publish
# For NPM packages
npm i quick-publish -g
publish
Both versions provide the same streamlined experience with language-specific optimizations.
Development
Quick Start with uv
# Clone repository
git clone https://github.com/quick-publish/quick-publish-py.git
cd quick-publish-py
# Install dependencies and set up development environment
uv sync --dev
# Run tests
uv run pytest
# Run all quality checks
make check
# Or run individual checks
uv run ruff check src tests
uv run black --check src tests
uv run mypy src
Using Makefile
# Install dependencies and run tests
make dev-setup
# Run all quality checks
make check
# Build the package
make build
# See all available commands
make help
Contributing
Please see CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
Credits
quick-publish wouldn't exist without the inspirations from following projects:
- quick-publish (npm) - Original npm version
- conventional-changelog-cli
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quick_publish-0.1.7-py3-none-any.whl.
File metadata
- Download URL: quick_publish-0.1.7-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
612c768c7f416a814a135aabc2959b7c780fa825a0530bec410d21a0df5d1d0b
|
|
| MD5 |
6c6f7eb2901c1479aec15af5182050c6
|
|
| BLAKE2b-256 |
c2314343d44286b1fbeb6afd14b466bd02108446e29ba7f6af04d11d1ecba916
|