Skip to content

PyProject Cookiecutter Template

This is a CookieCutter template for Python projects. It uses modern tools for development, testing, and packaging. Depending on the responses to the initial prompts, it can create a boilerplate for data science projects or for a general Python package.

Requirements

To use this template, you need to have CookieCutter available on your machine. Either install it globally via pip or conda, or use uv to run it without the need of installing it. The latter is recommended.

Quickstart

To get started, simply run

uvx cookiecutter gh:markusritschel/cookiecutter-pyproject
and follow the prompts to customize your project. Once finished, navigate into the created directory to start working on your new Python project!

Without uv

If you don't want to use uv, you can also install CookieCutter globally and run it with the following command:

cookiecutter gh:markusritschel/cookiecutter-pyproject

Features

This template comes ready with a collection of modern and useful tools for an efficient development flow:

  • Package Management: uv for blazingly fast dependency management and virtual environments (it's a lot faster than conda 🚀)
  • Code Quality: Ruff for linting & formatting, ty for type checking, pytest for testing
  • Task Automation: Just as a modern Make alternative (just qa, just docs, …)
  • GitHub Actions CI/CD: Automated testing, linting, and documentation deployment; Dependabot for dependency updates
  • Documentation: Sphinx with MyST Markdown, autoapi, and GitHub Pages deployment
  • Publishing: PyPI publishing via just publish or automated GitHub Actions workflow
  • Research Projects: Optional data science structure: data/, notebooks/, reports/
  • src layout: Ensures tests always run against the installed package, not loose source files
  • DevContainer: VSCode dev container for a reproducible development environment

How to continue

Read the Tutorial for a step-by-step guide to create a new project. In the features section you can find detailed documentation for each tool and feature (links above).