templatepy
Copier template for modern Python packages.
Stack
| Tool | Role |
|---|---|
| uv | dependency management, virtual environments |
| hatchling + hatch-vcs | build backend; version from git tags |
| commitizen | Conventional Commits enforcement; auto bump on merge |
| ruff | linting + formatting |
| mypy | static type checking |
| pytest + pytest-cov | testing with coverage |
| gitleaks | secret scanning |
Quickstart
uv tool install copier
copier copy gh:larsrollik/templatepy my-new-project
cd my-new-project
git init && git add -A && git commit -m "chore: initial commit from templatepy"
uv sync --extra dev
uv run pre-commit install --hook-type pre-commit --hook-type commit-msg
Update existing project
cd my-existing-project && copier update
Release flow
feature branch → PR → CI gate (lint + test) must pass
merge blocked until green
↓
merge to main (merge commit)
↓
versioning.yml fires on push to main:
→ cz bump → tag vX.Y.Z → dispatch release.yml
↓
release.yml (on tag / dispatch):
→ GitHub release (wheel + sdist attached)
→ PyPI via OIDC trusted publishing (if enable_pypi_publishing)
→ Zenodo webhook (if enabled)
PyPI setup (one-time per repo)
Only if you answered enable_pypi_publishing: true (otherwise release.yml
makes the GitHub/Forgejo release but skips the publish step). Uses OIDC trusted
publishing — no API token stored in GitHub secrets.
- pypi.org → project → Settings → Publishing → Add trusted publisher
- Owner:
<github-user>, Repository:<repo>, Workflow:release.yml - Done — the workflow handles authentication automatically.
Branch protection (optional)
Generated projects ship a stepper that creates the repo, points you through
installing the release-bot App, and installs a main-protected ruleset
(require PR + review + the CI check, block force-push/deletion):
bash scripts/setup_repo.sh # guided: create → App → protect
# or just the ruleset on an existing repo:
bash scripts/setup_branch_protection.sh
versioning.yml is adaptive: with the App configured (CI_BOT_CLIENT_ID
variable + CI_BOT_PRIVATE_KEY secret; CI_BOT_APP_ID names the App as the ruleset bypass actor) it pushes the bump as that App — a
ruleset bypass actor — so protection and auto-release coexist; without it, it
falls back to github-actions[bot] on an unprotected main. The generated
docs/repository-setup.md covers the App, its permissions, and the secrets.
Docs
uv run mkdocs serve
mkdocs.yml + the docs extra are always generated (build locally as above).
Deploy to GitHub Pages on push to main via docs.yml is added only when
enable_docs_publishing: true.
Optional workflows (copier answers)
Three publish/automation extras are off by default; enable per project:
enable_pypi_publishing— PyPI publish step inrelease.yml(+ OIDCid-token).enable_docs_publishing— the GitHub Pages / Forgejodocs.ymldeploy workflow.enable_llm_pr_review— the optional LLM PR-review workflow (pr-review.yml).
When off, the corresponding workflow file is not generated at all (no "not configured" placeholder checks).
Metadata
Release files for templatepy 0.15.1
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 | |
|---|---|---|---|---|
| templatepy-0.15.1.tar.gz | 21.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| templatepy-0.15.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.3 kB
Release files / templatepy-0.15.1.tar.gz
| Download URL | templatepy-0.15.1.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
592d6c07c52d9ae92b305dfab7366cd84f1839cc958aeebbf3c6e9440998f2b0
|
|
BLAKE2b-256 checksum How to use checksums |
91f71dd4dda1899fbe847de5f7d1af870e567d21edca66723d8cb953eab92efe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / templatepy-0.15.1-py3-none-any.whl
| Download URL | templatepy-0.15.1-py3-none-any.whl |
|---|---|
| Size | 36.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea91c090d72a78b36dc55f0397049af06b5aefad148ebed23573ac8a849700f2
|
|
BLAKE2b-256 checksum How to use checksums |
80d5f20013e6e29a80f63896fb865dd4800c18bab583cf19edb893554e9394bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for templatepy 0.15.1
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.