Python Project Templates: uv vs Cookiecutter - Batteries Included

PP
Blog Post

A comprehensive guide to choosing between uv and Cookiecutter for Python project scaffolding, plus the top templates for packages, CLI tools, and more.

Which One Should You Use?

When starting a new Python project, you want a solid structure without spending hours on boilerplate. Two popular approaches exist: uv for fast, modern scaffolding and Cookiecutter for comprehensive, batteries-included templates.

Option A: The "uv" Route (Fast & Standard)

If you want to get started immediately with a standard, modern structure, just use uv. You don't need Cookiecutter.

pip install uv

uv init my-new-tool --lib

This gives you about 80% of a professional structure: src layout, pyproject.toml, and modern Python packaging standards. It's clean, minimal, and perfect for getting started quickly.

Option B: The "Cookiecutter" Route (Comprehensive)

If you want a batteries-included setup with pre-configured documentation folders, GitHub Action workflows for testing, linting configurations, and more, use Cookiecutter with a popular template.

pip install cookiecutter

cookiecutter https://github.com/cjolowicz/cookiecutter-hypermodern-python

My Recommendation

Since you are building a new SDK/Tool: Start with uv.

The uv init --lib command creates the exact modern standard (src layout + pyproject.toml) without adding too much "bloat" or complex files you don't understand yet. You can manually add extra folders (like docs) later as you need them.

Top 5 Cookiecutter Templates

If you decide to go the Cookiecutter route, here are five highly regarded templates for different use cases:

1. Hypermodern Python

Motto: "The most advanced, batteries-included Python project template"

cookiecutter gh:cjolowicz/cookiecutter-hypermodern-python

Focus: Modern Python packaging, automation, CI, docs, and testing. This template includes everything you need for a professional open-source project.

2. Cookiecutter PyPackage

Motto: "A logical, reasonably standardized, but flexible project structure for open source Python packages"

cookiecutter gh:audreyfeldroy/cookiecutter-pypackage

Focus: Generic open-source Python packages with a classic, trusted structure. This is the number one and most widely recognized Cookiecutter template, maintained by Audrey Feldroy, one of the creators of Cookiecutter itself.

Key features:

  • Testing with pytest and GitHub Actions for Python 3.10-3.13
  • Auto-release to PyPI on tag pushes
  • CLI support using Typer
  • Read the Docs integration

3. Cookiecutter Data Science

Motto: "A logical, reusable, and extendable project structure for doing data science with Python"

cookiecutter https://github.com/drivendata/cookiecutter-data-science

Focus: Data science workflows including analysis, pipelines, and collaboration. Perfect for ML and data projects.

4. Full Stack FastAPI PostgreSQL

Motto: "Modern, full-stack web app generator with FastAPI, PostgreSQL, Docker, and more"

cookiecutter gh:tiangolo/full-stack-fastapi-postgresql

Focus: Web apps with FastAPI, async support, Docker, and deployment-ready configuration. Ideal for building modern APIs.

5. Cookiecutter Flask

Motto: "A Flask app starter with best practices and batteries included"

cookiecutter gh:cookiecutter-flask/cookiecutter-flask

Focus: Bootstrap-enabled, asset management, user registration/auth, and easy Flask API startup.

Bonus: Best Template for CLI Tools

Simon Willison's click-app is the number one Cookiecutter template specifically designed for CLI tools.

cookiecutter gh:simonw/click-app

Key features:

  • Click framework integration for beautiful CLIs
  • PyPI publishing workflow with Trusted Publishers
  • GitHub Actions CI/CD included
  • Pytest testing setup
  • Version management built-in
  • Minimal, production-ready structure

Notable CLI Projects Built With This:

  • shot-scraper: Automated website screenshots
  • s3-credentials: AWS S3 credential management
  • git-history: Git history analysis with SQLite

This template has become the de facto standard for Click-based CLI tools, with 340+ GitHub stars and active maintenance.

Final Thoughts

Start simple with uv for most projects. When you need the full batteries-included experience with CI/CD, documentation, and testing pre-configured, reach for Cookiecutter PyPackage or Hypermodern Python. For specialized needs like data science or CLI tools, use the domain-specific templates.

The key is to choose the right level of complexity for your project's stage and requirements.

Published on 11/28/2025by Claudio Teixeira