A modern cookiecutter template for creation of a Python package following best practices.
The resulting generated Python package features:
pyproject.tomlrufffor formatting/lintingpytestandcoveragefor running testspre-committo enforce formatting/linting before committingclick(optional if making a CLI app)sentry-sdkfor error reporting (optional)twinefor publishing to PyPIMakefilewith common development related commands- 100% test coverage
- Passes
ruff checklinting
Install Cookiecutter, if you don't already have it:
python3 -m pip install -U cookiecutterGenerate a Python package:
cookiecutter https://github.com/tsantor/cookiecutter-pyproject.gitmake env
make pip_install_all
make pytestRun make to view a list of available commands with descriptions.
This is what I want. It might not be what you want. If you have differences in your preferred setup, I encourage you to fork this to create your own version.