CookiePyStarter — the modern Python cookiecutter template. uv · ruff · mypy · pytest · pre-commit · Docker · CI. uvx cookiecutter gh:mramitdas/CookiePyStarter
Cookiecutter is the de-facto tool for generating project scaffolds in Python, and choosing the right python cookiecutter template is the difference between a project that starts green and one you spend a weekend repairing. This guide explains how to use a template, what the modern ones should give you, and how CookiePyStarter fits in.
Cookiecutter is a cross-platform
CLI that renders a template directory through Jinja2
while asking you a short series of questions defined in cookiecutter.json.
It supports hooks (scripts run before/after generation), choice variables,
and conditional files. Nothing about it is Python-specific — templates exist
for Rust, Terraform, docs — but Python is where it is most loved.
uvx cookiecutter gh:mramitdas/CookiePyStarter
That command downloads the template, asks you its prompts, renders your project, and — with CookiePyStarter — immediately runs lint, type check, tests, installs dependencies with uv, installs pre-commit hooks, and makes an initial git commit. If any of that fails, generation stops loudly rather than handing you a broken project.
No global installs: uvx runs the tool in an ephemeral environment.
A template earns its keep by opinion, not volume. The 2026 baseline:
pyproject.toml only. PEP 621 metadata, no requirements/*.txt,
no setup.py. Dependency groups (PEP 735) for dev extras.src/<package>/ keeps your tests honest (they import
the installed package, never the working directory).CookiePyStarter ships exactly ten prompts (name, package name, description, author, email, GitHub username, license, Python version, Docker, docs) and post-generation hook that:
uv sync, pre-commit install, git init + initial commit,ruff, mypy --strict, and pytest all pass.Its own CI renders the template six ways (ubuntu + windows × three config permutations) and runs full checks inside each render — so template changes are never merged broken.
cookiecutter.json.remove_optional_paths) when the option is off.uvx cookiecutter gh:mramitdas/CookiePyStarter
Or browse the source at https://github.com/mramitdas/CookiePyStarter.