Quad4 template for dependency-free typed Python libraries.
src/layout with Hatchling, dynamic version from__init__.py- Fully typed,
py.typedshipped, mypy strict oversrcandtests - ruff lint + format, bandit, pytest
make checkruns the full local gate- GitHub Actions: CI matrix 3.10-3.14, CodeQL, OpenSSF Scorecard with SARIF upload, zizmor, dependency review, tag-triggered PyPI release with build provenance and attestations
- All actions pinned to commit SHAs, least-privilege permissions,
step-security/harden-runneron every job, Dependabot with 7-day cooldown
-
Create a repository from this template (GitHub "Use this template" button) or copy the tree.
-
Rename the package:
mv src/packagename src/mypkg mv tests/test_packagename.py tests/test_mypkg.py grep -rl packagename . | xargs sed -i 's/packagename/mypkg/g'
-
Update
pyproject.toml: description, keywords, classifiers, repository URL. -
Update
SECURITY.mdif the contact address differs. -
For releases, configure a PyPI trusted publisher for the repository (workflow
release.yml, environmentpypi), then tagv*to publish.
License: 0BSD.