Skip to main content

QuickPub

Python 3.8+ License: MIT

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.8+ (tested on 3.8–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.8.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.8.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:

  1. Enforcers — checks README, LICENSE, .pypirc, and local/PyPI version consistency
  2. Quality assurance — mypy, pylint, pytest, and unittest with configurable score bounds, in parallel across detected Python environments
  3. File generation — by default writes setup.py, pyproject.toml, MANIFEST.in, and updates __init__.py. Pass generate_project_files=False to keep an existing pyproject.toml (only [project].version and __init__.__version__ are updated).
  4. Build & upload — builds the sdist (SetuptoolsBuildSchema or UvBuildSchema) 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.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

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

Release files / quickpub-4.1.4-py3-none-any.whl

Download URL quickpub-4.1.4-py3-none-any.whl
Size 52.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
649e44d9d3fea632ed4aa59047703410e076fb17ab1327dbfa23fc8b353ed61b
BLAKE2b-256 checksum
How to use checksums
55b3276566c6244fbb80a057a6f686d19669a5f14a9d497c2f193c047fc99332
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.1.4

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.

Release history Release notifications | RSS feed

This release

4.1.4 This release

1 release file No provenance

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