Cookiecutter Python Package
A modern cookiecutter template for Python packages with best practices built-in.
Get Started in 30 Seconds
Development Status
This project is currently in active development.
AI-Generated Content Notice
A significant portion of this project's content (including code, documentation, and examples) has been generated using AI assistance. Please review all code and documentation carefully before use in production environments. We recommend thorough testing and validation of any AI-generated components.
What You Get
This template creates a Python package with modern best practices and industry-standard tools:
๐ฆ Modern Package Structure
- Source layout (
src/
directory) for cleaner organization - PEP 621 compliant
pyproject.toml
configuration - Build backend selection (setuptools, hatchling, flit, or pdm)
- Type hints and
py.typed
marker for better IDE support - Entry points for CLI applications
๐งช Quality Assurance
- pytest for modern testing with fixtures and parametrization
- Coverage reporting with HTML/XML output
- Ruff for ultra-fast linting and formatting
- MyPy for static type checking
- Bandit for security vulnerability scanning
๐ง Development Tools
- uv for ultra-fast package management (optional)
- pre-commit hooks for automated quality checks
- GitHub Actions for CI/CD automation
- Dependabot for dependency updates
๐ ๏ธ CLI Support
Choose your preferred CLI framework: - Typer (modern, type-based) - Click (decorator-based) - Argparse (standard library)
โ๏ธ Template Options Overview
Customize your generated project by choosing from these options:
- Build Backend: setuptools, hatchling, flit, or pdm
- Code Quality: Ruff, MyPy, Bandit, Safety
- Testing: pytest, coverage reporting
- Documentation: MkDocs or Sphinx
- CLI Framework: Typer, Click, Argparse, or none
- Package Management: uv or pip
- Automation: pre-commit, GitHub Actions, Dependabot
See Template Configuration for detailed explanations of all options.
๐ Documentation Ready
- MkDocs or Sphinx support
- README templates with badges
- CHANGELOG following Keep a Changelog format
- Contributing guidelines
Quick Examples
Perfect for simple libraries:
Complete setup with all quality tools:
Why This Template?
Modern Best Practices
- PEP 621 compliant packaging
- Source layout for cleaner imports
- Type hints throughout
- Security scanning built-in
Developer Experience
- Fast setup with sensible defaults
- Comprehensive tooling options
- Automated quality checks
- CI/CD ready workflows
Flexibility
- All tools optional - choose what you need
- Multiple CLI frameworks supported
- Documentation options (MkDocs/Sphinx)
- Container support with Docker
Next Steps
- Quick Start - Create your first package in minutes
- Configuration - Understand all available options
- Tools Guide - Learn about included tools
- Examples - See real-world usage patterns
Community
- GitHub Repository - Source code and issues
- Contributing - Help improve the template
- Discussions - Ask questions and share ideas
Built with โค๏ธ for the Python community