QuickPub
Catch publish failures on your machine before they hit CI or PyPI.
QuickPub runs pre-publish checks, quality tools, tests, packaging, and upload in one pipeline — so broken releases fail locally with fast feedback.
The problem
Publishing a Python package usually means juggling several steps: validate project files, run mypy/pylint/pytest, bump the version, generate packaging files, build the sdist, upload to PyPI. Miss a step and you find out in CI — or worse, after a bad release.
QuickPub wires those steps together. You define your package once; it enforces constraints, runs QA across Python environments, builds, and uploads.
Install
pip install quickpub
With uv:
uv add quickpub
Requires Python 3.11+ (tested on 3.11–3.13).
Quick start
Add a publish.py in your project root:
from quickpub import (
publish,
MypyRunner,
PylintRunner,
PytestRunner,
SetuptoolsBuildSchema,
PypircUploadTarget,
PypircEnforcer,
ReadmeEnforcer,
LicenseEnforcer,
LocalVersionEnforcer,
PypiRemoteVersionEnforcer,
)
publish(
name="my-package",
version="1.0.0",
author="Your Name",
author_email="you@example.com",
description="My package",
homepage="https://github.com/you/my-package",
dependencies=["requests>=2.25.0"],
min_python="3.11.0",
enforcers=[
PypircEnforcer(),
ReadmeEnforcer(),
LicenseEnforcer(),
LocalVersionEnforcer(),
PypiRemoteVersionEnforcer(),
],
global_quality_assurance_runners=[
MypyRunner(bound="<=20"),
PylintRunner(bound=">=0.8"),
PytestRunner(bound=">=0.95"),
],
build_schemas=[SetuptoolsBuildSchema()],
upload_targets=[PypircUploadTarget()],
)
uv / pyproject.toml projects (important)
If the project already has a PEP 621 pyproject.toml (uv, Hatch, Poetry, PDM), do not use the default file generation. publish() would overwrite pyproject.toml and wipe [dependency-groups], [tool.uv], [tool.mypy], and other toolchain config.
Use UvBuildSchema and generate_project_files=False:
from quickpub import (
publish,
UvBuildSchema,
PypircUploadTarget,
PypircEnforcer,
ReadmeEnforcer,
LicenseEnforcer,
LocalVersionEnforcer,
PypiRemoteVersionEnforcer,
MypyRunner,
PylintRunner,
PytestRunner,
)
publish(
name="my-package",
version="1.0.0",
author="Your Name",
author_email="you@example.com",
description="My package",
homepage="https://github.com/you/my-package",
dependencies=["requests>=2.25.0"],
min_python="3.11.0",
enforcers=[
PypircEnforcer(),
ReadmeEnforcer(),
LicenseEnforcer(),
LocalVersionEnforcer(),
PypiRemoteVersionEnforcer(),
],
global_quality_assurance_runners=[
MypyRunner(bound="<=20"),
PylintRunner(bound=">=0.8"),
PytestRunner(bound=">=0.95"),
],
build_schemas=[UvBuildSchema()],
generate_project_files=False,
upload_targets=[PypircUploadTarget()],
)
That keeps the existing pyproject.toml, bumps only [project].version and __init__.__version__, and builds with uv build. See this repo's publish.py.
Run it:
python publish.py
Dry run — validate and run QA without building or uploading:
publish(..., demo=True)
PyPI upload needs a valid .pypirc. See this repo's publish.py for a full working example.
What runs
When you call publish(), QuickPub runs these stages in order:
- Enforcers — checks README, LICENSE,
.pypirc, and local/PyPI version consistency - Quality assurance — mypy, pylint, pytest, and unittest with configurable score bounds, in parallel across detected Python environments
- File generation — by default writes
setup.py,pyproject.toml,MANIFEST.in, and updates__init__.py. Passgenerate_project_files=Falseto keep an existingpyproject.toml(only[project].versionand__init__.__version__are updated). - Build & upload — builds the sdist (
SetuptoolsBuildSchemaorUvBuildSchema) and uploads via twine (and optionally pushes to GitHub)
Skip build and upload with demo=True.
Environment detection
By default, QuickPub detects your toolchain from the project root:
| Project layout | Package manager | Python provider |
|---|---|---|
uv.lock present |
UvPackageManager |
UvPythonProvider |
| otherwise | PipPackageManager |
DefaultPythonProvider |
Override for conda or mixed setups:
from quickpub import CondaPythonProvider, UnionProvider
publish(
...,
python_interpreter_provider=UnionProvider([
CondaPythonProvider(["base", "py39", "py38"]),
]),
)
For full control, pass package_manager and python_interpreter_provider explicitly, or call resolve_publish_environment() before publish().
CLI
QuickPub installs a quickpub command that wraps publish() via Fire. For most projects, a publish.py script is easier to maintain than long CLI invocations.
Development
To work on QuickPub itself, clone the repo and use uv:
git clone https://github.com/danielnachumdev/quickpub.git
cd quickpub
uv sync
uv run pytest
License
MIT — see LICENSE.
Metadata
Release files for quickpub 4.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quickpub-4.2.0-py3-none-any.whl | Python 3 | none | any | Details for quickpub-4.2.0-py3-none-any.whl |
Release files / quickpub-4.2.0-py3-none-any.whl
| Download URL | quickpub-4.2.0-py3-none-any.whl |
|---|---|
| Size | 52.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f57b1cb2b0054a86d06fe631a7c38f888b9f6cd3d8198ecaf968774633448024
|
|
BLAKE2b-256 checksum How to use checksums |
5d9a64ed4b96a76c49f8de694c487fe4fde5e025227f29fb99cee73f1c4255d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for quickpub 4.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.