Cookiecutter PyPackage
Cookiecutter template for a Python package with production-ready CI and automated PyPI publishing.
uvx cookiecutter-pypackage
What you get
Tooling
| Tool | ||
|---|---|---|
| Package manager | uv | Fast, handles venvs automatically |
| Task runner | just | just qa formats, lints, type-checks, and tests |
| Linting | ruff | Format + lint in one tool |
| Type checking | ty | All rules enabled, watch mode with just type-check-watch |
| Testing | pytest | Python 3.12, 3.13, 3.14 |
| CLI framework | Typer | Entry point + __main__.py included |
| Docs | Zensical + mkdocstrings | Auto-deployed to GitHub Pages, API docs from docstrings |
CI/CD (GitHub Actions, security-hardened)
| Workflow | Trigger | What happens |
|---|---|---|
| CI | Push, 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 SHA-pinned actions |
All actions pinned by SHA, minimal permissions, no persisted credentials.
Quickstart
Install uv, then:
uvx cookiecutter-pypackage
You'll be prompted for your package name, GitHub username, and a few other values (full list). Then push to GitHub and follow the tutorial to enable Pages and set up PyPI publishing.
Without uvx
uv venv
source .venv/bin/activate
uv pip install cookiecutter
cookiecutter gh:audreyfeldroy/cookiecutter-pypackage
Documentation
audreyfeldroy.github.io/cookiecutter-pypackage
- 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.
Discord | MIT license
Metadata
Release files for cookiecutter-pypackage 0.5.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 |
|---|---|---|---|---|
| cookiecutter_pypackage-0.5.0.tar.gz | 20.9 kB | With provenance | Details for cookiecutter_pypackage-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cookiecutter_pypackage-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for cookiecutter_pypackage-0.5.0-py3-none-any.whl |
Total release size: 54.1 kB
Security for cookiecutter-pypackage 0.5.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.
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.