Cookiecutter template for a Python package.
- Testing with pytest
- Formatting, linting and import sorting with Ruff
- Static typing with mypy
- Git hooks that run all the above with pre-commit
- Deployment ready with Docker
- Continuous Integration with GitHub Actions
- Architecture decisions documented in an Architecture Decision Record
Install the latest Cookiecutter if you haven't installed it yet (this requires Cookiecutter 1.4.0 or higher):
pip install -U cookiecutter
Generate a Python package project:
cookiecutter gh:Debakel/python-cookiecutter
Or, with pipx
installed:
pipx run cookiecutter gh:Debakel/python-cookiecutter
Then:
# Enter project directory
cd <repo_name>
# Initialise git repo
git init
# Install dependencies
pipenv install --dev
# Setup pre-commit and pre-push hooks
pipenv run pre-commit install