
Cookiecutter Python Template
Features
- Dependency and virtual environment management (one of the following based on user choice)
- Coding style
- ruff: check coding style, security rules (flake8-bandit
S) and format it
- mypy: check static typing
- Test through pytest with the following plugins
- commitizen:
- regulate git commit convention
- bump project version
- generate changelog automatically
- Security check through
- mkdocs: generate documentation
- pre-commit: git-hook to run the above tools automatically
- Task runner to organize the tools above (one of the following based on user choice, default to invoke)
- invoke: tasks written in Python (like Makefile in Python)
- poethepoet: tasks declared in
pyproject.toml
- just: tasks declared in a
justfile
- CI/CD
- GitHub Actions workflows for
- checking coding style
- testing
- publishing package to PyPI
- pushing documentation to GitHub pages
- GitHub issue templates, pull request template
- General Python project Dockerfile
- Consolidate most of the tool configurations in
pyproject.toml
Getting Started
Prerequisites
Usage
cruft create https://github.com/Lee-W/cookiecutter-python-template
Setup secrets for GitHub Actions
- Required GitHub repository secrets
PERSONAL_ACCESS_TOKEN: GitHub personal access token used to bump project version automatically
- (optional) PyPI Trusted Publishing: no API token is needed
Authors
Lee-W