This is a modern Cookiecutter template that can be used to initiate a Python project with all the necessary tools for development, testing, and deployment. It supports the following features:
- uv for dependency management
- Supports both src and flat layout.
- CI/CD with GitHub Actions
- Pre-commit hooks with prek
- Code quality with ruff, mypy/ty and deptry.
- Publishing to PyPI by creating a new release on GitHub
- Testing and coverage with pytest and codecov
- Documentation with MkDocs
- Containerization with Docker or Podman
- Development environment with VSCode devcontainers
On your local machine, navigate to the directory in which you want to create a project directory, and run the following command:
uvx cookiecutter https://github.com/lukemcguire/cookiecutter-uv.gitor if you don't have uv installed yet:
pip install cookiecutter
cookiecutter https://github.com/lukemcguire/cookiecutter-uv.gitFollow the prompts to configure your project. You'll be asked to select a Python version from your uv-managed installations. The template will verify the version is available.
Once completed, a new directory containing your project will be created. Then navigate into your newly created project directory and follow the instructions in the README.md to complete the setup of your project.
The template will prompt you to select from Python 3.10, 3.11, 3.12, 3.13, or 3.14. If your selected version isn't installed, install it with:
uv python install 3.13 # or your preferred versionThis project is a fork of Florian Maas' project which is partially based on Audrey Feldroy's's great cookiecutter-pypackage repository.