Opinionated cookiecutter template for Python projects which uses uv to manage
packages and Python installations. You can use the template to quickly get up
and running for:
- Python packaging
- Machine Learning projects
- Data analysis
- Docker deployments
- API development
- Automation scripts
- ...
uvto manage packages and Python installationspytestfor unit-testing- GitHub action to execute tests.
- [Optional]
pre-commit:ruffhook to format and lint codeuvhook to keepuv.lockup-to dategitleakshook to prevent you from committing secrets (API keys, etc.)
- [Optional] Docker template (with Python and
uv)
Note
The cookiecutter template let's YOU set the Python version! A Python installation is not required. uv will install the appropriate Python version, if necessary.
As a prerequisite, you need to have uv
installed. Visit the installation guide
(it's really simple to set-up).
With uv, install pre-commit and cookiecutter as tools.
uv tool install pre-commit cookiecutterThat's it!
To use the cookiecutter template:
cookiecutter https://github.com/JakobKlotz/python-template.git... which walks you through the set-up of your project. After the project
structure creation, the virtual environment and pre-commit hooks are
automatically installed. 🚀
To execute the pre-bundled script, simply use:
uv run main.pyThe script just prints the current Python version.
Any contributions are welcome! 👋🏽 Check out CONTRIBUTING.md
