PyPkg Factory
Cookiecutter template for a Python package with production-ready CI and automated PyPI publishing.
- GitHub | PyPI | Documentation
- Created by Martin TOUZOT | GitHub @mtouzot | PyPI @audreyr
- MIT License
Credits
PyPkg Factory is a fork from Cookiecutter PyPackage by Audrey M. Roy Greenfeld
What you get
Tooling
| Tool | ||
|---|---|---|
| Package manager | uv | Fast, handles venvs automatically |
| Task runner | just | just fix applies safe fixes, just check verifies, and just fix-and-check does both |
| Linting | ruff | Format + lint in one tool |
| Type checking | ty | All rules enabled, watch mode with just type-check-watch |
| Testing | pytest | just check tests Python 3.14; just testall and CI cover 3.12, 3.13, and 3.14 |
| CLI framework | Typer | Entry point + __main__.py included |
| Docs | Zensical + mkdocstrings | GitHub Pages deployment, API docs from docstrings |
CI/CD (GitHub Actions, security-hardened)
| Workflow | Trigger | What happens |
|---|---|---|
| CI | Push to main, PRs | Lint, type check, test across 3 Python versions |
| Publish | v* tag |
Build, Sigstore attestation, PyPI via Trusted Publishers (no tokens) |
| Docs | Push to main | Build and deploy to GitHub Pages |
| Dependabot | Weekly | PRs to update Python dependencies and SHA-pinned actions |
All actions pinned by SHA, minimal permissions, no persisted credentials.
Quickstart
Install uv, then:
uvx pypkg-factory
You'll be prompted for your package name, GitHub username, and a few other values (full list). Follow the tutorial to generate, verify, and release your package.
Without uvx
uv venv
source .venv/bin/activate
uv pip install cookiecutter
cookiecutter --keep-project-on-failure gh:mtouzot/pypkg-factory
Override template variables
Pass key=value arguments to prefill prompts, or add --no-input for
automation:
uvx pypkg-factory full_name="Your Name"
See Template prompts and command-line options for all variables, defaults, and automation options.
Documentation
mtouzot.github.io/pypkg-factory
- Tutorial - from generation to first PyPI release
- Project Structure - what's in the generated project
- GitHub Actions - CI, publish, docs deployment, security hardening
- Prompts - what each prompt means
- Troubleshooting
Alternatives
This template is opinionated. If it doesn't fit:
- Browse the fork network for variants
- Create your own template from scratch
Pull requests welcome if they're small, atomic, and improve the template.
Metadata
Release files for pypkg-factory 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pypkg_factory-0.1.0.tar.gz | 30.3 kB | With provenance | Details for pypkg_factory-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pypkg_factory-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pypkg_factory-0.1.0-py3-none-any.whl |
Total release size: 73.1 kB
Release files / pypkg_factory-0.1.0.tar.gz
| Download URL | pypkg_factory-0.1.0.tar.gz |
|---|---|
| Size | 30.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd41270378ed775d588cfe4ff4cacce5942f018d75800e7577388e4ad321eb0c
|
|
BLAKE2b-256 checksum How to use checksums |
e51918078654feaffbc8a4f8f3bc6db557bfbebfacb65c0d3ad7d488d44904a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logRelease files / pypkg_factory-0.1.0-py3-none-any.whl
| Download URL | pypkg_factory-0.1.0-py3-none-any.whl |
|---|---|
| Size | 42.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9181853ac3055f3313854f59bc8d517b5507082a9e4cdeb26dcff11a603ed4f4
|
|
BLAKE2b-256 checksum How to use checksums |
01e278e03871ad6bcfea8aee009577b892fa28bc5b85675688d98e76f8e5ad5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logSecurity for pypkg-factory 0.1.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pypkg_factory-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logA 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.