Skip to content

wdm0006/cookiecutter-pipproject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Modern Python Project Template 🐍

A modern, production-ready cookiecutter template for Python packages that follows best practices. This template sets up a complete development environment with all the tools you need to build, test, and publish professional Python libraries.

Features

πŸ“¦ Modern Python Packaging

  • pyproject.toml: Uses the modern Python packaging standard (PEP 517/PEP 621)
  • Hatch: Fast, modern project management and build tool
  • uv: Ultra-fast Python package installer and resolver
  • Automatic version management
  • Development and production dependency separation
  • Proper package metadata and classifiers

πŸ§ͺ Testing & Quality Assurance

  • pytest: Modern testing framework
  • tox: Automated testing across Python versions
  • Coverage.py: Code coverage tracking

πŸ“ Code Quality Tools

  • ruff: Ultra-fast Python linter and formatter
    • Code style enforcement (PEP 8)
    • Import sorting
    • Dead code detection
    • Best practice enforcement
  • mypy: Static type checking
  • Pre-configured with sensible defaults
  • Easy to customize rules

πŸ“š Documentation

  • Sphinx: Professional documentation generator
  • ReadTheDocs theme
  • Automatic API documentation

πŸ”„ CI/CD Automation

  • GitHub Actions workflows for:
    • Testing across Python versions
    • Code quality checks
    • Documentation builds
    • Automated PyPI releases

🀝 Community & Contribution Tools

  • Structured issue templates for:
    • Bug reports
    • Feature requests
    • Documentation improvements
  • Pull request template

πŸ› οΈ Development Workflow

  • Makefile with common development commands:
    make install-dev    # Install development dependencies
    make test          # Run tests
    make lint          # Check code quality
    make format        # Format code
    make docs          # Build documentation
    make clean         # Clean build artifacts

Quick Start

  1. Install Cookiecutter:

    pip install cookiecutter
  2. Create your project:

    cookiecutter gh:{{cookiecutter.github_username}}/cookiecutter-pipproject
  3. Initialize your development environment:

    cd your-project-name
    curl -LsSf https://astral.sh/uv/install.sh | sh  # Install uv
    make install-dev
  4. Start developing:

    # Run tests
    make test
    
    # Check code quality
    make lint
    
    # Format code
    make format
    
    # Build docs
    make docs

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

This template builds on the work of many in the Python community and incorporates modern best practices from various sources. Special thanks to:

About

A(nother) cookiecutter template for pip-installable python projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published