A template for python packages
Project description
pypkgkit
A Cookiecutter template for Python packages. One command gives you a fully configured project with linting, type checking, testing, CI/CD, documentation, and automated releases — all wired together and ready to go.
Quick start
# Install cookiecutter if you haven't already
uv tool install cookiecutter
# Generate a new project
cookiecutter gh:michaelellis003/pypkgkit
To pin a specific template version, pass the --checkout flag with a
release tag:
cookiecutter gh:michaelellis003/pypkgkit --checkout v2.1.2
You will be prompted for a few values:
| Variable | Default | Description |
|---|---|---|
project_name |
my-python-package |
Name of the project (used in PyPI, GitHub, etc.) |
project_slug |
auto | Python-importable name (derived from project name) |
project_description |
A Python package |
One-line description |
author_name |
Your Name |
Author name for pyproject.toml and LICENSE |
author_email |
you@example.com |
Author email |
github_username |
your-github-username |
GitHub username (used in URLs, badges, CODEOWNERS) |
python_version |
3.12 |
Minimum Python version |
initial_version |
0.1.0 |
Starting version |
After generation, the template automatically:
- Initializes a git repository
- Installs dependencies with
uv sync - Installs pre-commit hooks
- Creates an initial commit
What is included
Every generated project comes with:
| Concern | Tool |
|---|---|
| Package management | uv |
| Linting & formatting | Ruff |
| Type checking | ty |
| Testing | pytest |
| Documentation | ProperDocs (MkDocs Material + mkdocstrings) |
| Versioning & releases | python-semantic-release with Conventional Commits |
| CI/CD | GitHub Actions (lint, type check, test across 3.10 – 3.13, build, release to PyPI, deploy docs) |
| Dependency updates | Dependabot (weekly, for both Actions and pip) |
| Pre-commit hooks | Ruff, ty, license headers, conventional commit validation |
After generating your project
-
Create a GitHub repo and push:
git remote add origin https://github.com/<username>/<project-name>.git git push -u origin main
-
Configure GitHub settings:
- GitHub Pages: Settings > Pages > Source:
gh-pages - RELEASE_TOKEN: Settings > Secrets — a PAT with
contents: write - PyPI trusted publishing: add the repo on pypi.org
- CODECOV_TOKEN: Settings > Secrets (optional)
- GitHub Pages: Settings > Pages > Source:
Requirements
- uv installed
- cookiecutter (
uv tool install cookiecutter)
Contributing
To work on the template itself:
git clone https://github.com/michaelellis003/pypkgkit.git
cd pypkgkit
uv sync
uv run pre-commit install
uv run pre-commit install --hook-type commit-msg
uv run pre-commit install --hook-type pre-push
Test the template locally:
cookiecutter . --no-input
License
Apache 2.0. See LICENSE for the full text.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pypkgkit-2.1.3.tar.gz.
File metadata
- Download URL: pypkgkit-2.1.3.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b392f5bab69e3efda28e85e089e12773eb3bd79aaa978eab681cf735860ed238
|
|
| MD5 |
2cc96e8d2314f849f4796ca743774053
|
|
| BLAKE2b-256 |
f02486461148080a4b59b8ce7a2f6d50a5de42e0ae184a69a04eea3b9522641a
|
Provenance
The following attestation bundles were made for pypkgkit-2.1.3.tar.gz:
Publisher:
release.yml on michaelellis003/pypkgkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pypkgkit-2.1.3.tar.gz -
Subject digest:
b392f5bab69e3efda28e85e089e12773eb3bd79aaa978eab681cf735860ed238 - Sigstore transparency entry: 1268746447
- Sigstore integration time:
-
Permalink:
michaelellis003/pypkgkit@16e3674543fef6d17af59848814fe6431464bc9b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/michaelellis003
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16e3674543fef6d17af59848814fe6431464bc9b -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file pypkgkit-2.1.3-py3-none-any.whl.
File metadata
- Download URL: pypkgkit-2.1.3-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15763a0676f781b9a97b30932ab7cf3443bc1e25577b65d7a6bee9f11fc3e806
|
|
| MD5 |
9c6facaf8b3c3b825b782e21dc6cc4d2
|
|
| BLAKE2b-256 |
d18bdc16cfb6762ba58c6429a8b132e9e4bd27291634b9585406355179b984c2
|
Provenance
The following attestation bundles were made for pypkgkit-2.1.3-py3-none-any.whl:
Publisher:
release.yml on michaelellis003/pypkgkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pypkgkit-2.1.3-py3-none-any.whl -
Subject digest:
15763a0676f781b9a97b30932ab7cf3443bc1e25577b65d7a6bee9f11fc3e806 - Sigstore transparency entry: 1268746538
- Sigstore integration time:
-
Permalink:
michaelellis003/pypkgkit@16e3674543fef6d17af59848814fe6431464bc9b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/michaelellis003
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16e3674543fef6d17af59848814fe6431464bc9b -
Trigger Event:
workflow_run
-
Statement type: