Skip to content

About

CookiePyStarter — the modern Python cookiecutter template. uv · ruff · mypy · pytest · pre-commit · Docker · CI. uvx cookiecutter gh:mramitdas/CookiePyStarter

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

CookiePyStarter Logo

CookiePyStarter

Modern Python Cookiecutter Template

The modern, green-on-first-render Python project generator.
uv · ruff · mypy · pytest · pre-commit · GitHub Actions · optional Docker & docs — in one command.

Quickstart Docs Release

Render Test License Apache-2.0 Python 3.10–3.14 Code style: ruff

CookiePyStarter Terminal Demo

CookiePyStarter is a Cookiecutter template that generates the Python project you always end up hand-rolling: a uv-managed, src-layout package wired with ruff, mypy, pytest, pre-commit, and GitHub Actions CI — and every generated project is green on first render (the generator itself runs lint, type check, and tests before it hands you the keys).

Works with the stock cookiecutter CLI — nothing else to install.

Why Choose CookiePyStarter?

⚡ Green on First Render

Post-generation hook runs uv sync, pre-commit install, ruff, mypy --strict, and pytest. Your project passes every check before you even CD into it.

🚀 Instant uv Dependency Sync

Built native for uv with modern PEP 621 metadata and PEP 735 dependency groups. Zero legacy requirements/*.txt or setup.sh files.

🛡️ Strict Quality Gates

Shipped with ruff (lint + format), mypy --strict type checking, and non-vacuous pytest suite with coverage pre-configured in pyproject.toml.

📜 Selectable Licensing

Prompt-driven license generation: choose MIT, Apache-2.0, BSD-3-Clause, or CC0 (None). The post-gen hook bakes author & year cleanly.

🐳 Optional Docker & Docs

Opt-in during generation for a multi-stage Dockerfile and a complete mkdocs-material site scaffold.

🧪 Multi-OS CI Matrix

Every generated project includes a zero-config .github/workflows/ci.yml pipeline, while CookiePyStarter itself tests renders across Ubuntu & Windows matrix.

Quickstart (30 seconds)

uvx cookiecutter gh:mramitdas/CookiePyStarter

Answer 10 short prompts (or press Enter for defaults) and get a project that already passes ruff check, ruff format --check, mypy --strict, and pytest — plus an initial git commit and pre-commit hooks installed.

Prefer pip? pipx run cookiecutter gh:mramitdas/CookiePyStarter works too.

How It Works

flowchart LR
    A["10 Prompts"] --> B["Jinja2 Rendering"]
    B --> C["Post-Gen Hook"]
    C --> D["uv sync & git init"]
    D --> E["ruff & mypy & pytest"]
    E --> F["🎉 Green Project Ready"]
Loading

What you get

my_awesome_project/
├── src/my_awesome_project/     # src-layout package (__version__ + utility + tests)
├── tests/                      # pytest suite with coverage (non-vacuous)
├── pyproject.toml              # PEP 621 metadata; ruff/mypy/pytest config inline
├── .pre-commit-config.yaml     # ruff + ruff-format + mypy hooks
├── .github/workflows/ci.yml    # GitHub Actions: lint + typecheck + tests
├── LICENSE                     # your choice: MIT / Apache-2.0 / BSD-3-Clause / CC0
├── README, CHANGELOG, CONTRIBUTING, CODE_OF_CONDUCT, SECURITY
├── AGENTS.md + STANDING_APPROVALS.md   # rules for AI coding agents
└── Dockerfile + mkdocs.yml     # only when you opted in

GitHub Actions Render Matrix Passed

Every dependency lives in pyproject.toml (PEP 735 dependency groups) — no requirements/ files, no setup.sh, no deserted tooling.

The 10 prompts

Prompt Default Choices
project_name My Awesome Project any
package_name derived valid Python identifier
project_description A short description… any
author Your Name any
email you@example.com any
github_username your_github_username any
license MIT MIT / Apache-2.0 / BSD-3-Clause / None (CC0)
python_version 3.12 3.10 – 3.14
docker no no / yes
docs no no / yes

The package name is validated before generation: invalid input (spaces, hyphens, keywords) aborts with a clear error, not a broken project.

Why another Python cookiecutter template?

CookiePyStarter cookiecutter-pypackage
Dependency management uv (fast, PEP 735 groups) pip / requirements
Lint + format ruff (one tool) flake8 + isort + separate config
Green-on-first-render yes — generator runs the checks no
Windows CI for the template itself yes (render matrix) partial
Generated project tests real package imports + coverage hello-world style
Docs engine option mkdocs-material mkdocs
License choice at generation 4 options incl. CC0 fixed

This template targets the modern Python project structure (src layout, PEP 621, single-source tool config) that the ecosystem has converged on in 2026. If you want a Django/Flask web scaffold, look at cookiecutter-django — CookiePyStarter is deliberately framework-agnostic.

Documentation

Long-form guides live in docs/ and are published on GitHub Pages:

Requirements

  • uv (the post-generation hook uses it to sync dependencies, install pre-commit, and verify the project is green) and git. Without uv, generation stops with a friendly error.

Community & support

Contributing

PRs welcome — see CONTRIBUTING and the Code of Conduct.

License

This template is licensed under the Apache License 2.0. Generated projects choose their own license at generation time.

About

CookiePyStarter — the modern Python cookiecutter template. uv · ruff · mypy · pytest · pre-commit · Docker · CI. uvx cookiecutter gh:mramitdas/CookiePyStarter

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages