Skip to main content

Cookiecutter template for a Python package

Project description

Cookiecutter PyPackage

PyPI version PyPI downloads

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

Alternatives

This template is opinionated. If it doesn't fit:

Pull requests welcome if they're small, atomic, and improve the template.


Discord | MIT license

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cookiecutter_pypackage-0.5.0.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cookiecutter_pypackage-0.5.0-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

Details for the file cookiecutter_pypackage-0.5.0.tar.gz.

File metadata

  • Download URL: cookiecutter_pypackage-0.5.0.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cookiecutter_pypackage-0.5.0.tar.gz
Algorithm Hash digest
SHA256 6584e025abdc458a93ec1d62f165f7300e0b141927e39afa07b9fc21048d216b
MD5 7defd69287ac664150c3c4315557f83e
BLAKE2b-256 4f1884e6fe50940cc04644c8c646da218c5df5794acc8c0b711aaaace8e2d9e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for cookiecutter_pypackage-0.5.0.tar.gz:

Publisher: publish.yml on audreyfeldroy/cookiecutter-pypackage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cookiecutter_pypackage-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cookiecutter_pypackage-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9dd3318a6667cea75dd8e0eb9feb8e99830e8ebcb751509915d5da6281c82a42
MD5 368a110d39e7664917660a7bd9589303
BLAKE2b-256 7d25327d3e31b0f6cfc15f52eeb066491d77dca3e17a3d8370f594d085338589

See more details on using hashes here.

Provenance

The following attestation bundles were made for cookiecutter_pypackage-0.5.0-py3-none-any.whl:

Publisher: publish.yml on audreyfeldroy/cookiecutter-pypackage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page