Skip to content

stateful-y/python-package-copier

Repository files navigation

python-package-copier

Python Version Tests Documentation License: MIT

A modern, production-ready Python package template using Copier. Save hours of setup time with best practices, modern tooling (uv, ruff, ty, pytest), and comprehensive CI/CD pipelines already configured.

📚 Full Documentation

Quick Start

# Create a new package
uvx copier copy gh:stateful-y/python-package-copier my-package

# Initialize
cd my-package
uv sync --group dev
uv run pytest

Features

  • Fast package management with uv
  • Code formatting and linting with ruff
  • Type checking with ty
  • Testing with pytest and coverage via Codecov
  • Documentation with MkDocs Material
  • Task automation with nox and just
  • CI/CD with GitHub Actions
  • Automated tag-based releases with git-cliff changelog generation, GitHub release creation, and PyPI publishing with manual approval gate
  • Pre-commit hooks for code quality
  • Modern PEP 517/518 build with hatchling

Template Development

# Clone and setup
git clone https://github.com/stateful-y/python-package-copier.git
cd python-package-copier
uv sync --group test --group docs

# Run unit tests (recommended during development)
just test-fast

# Run all tests
just test

# Format and fix code
just fix

# Build documentation
just serve

Test Generated Projects

just gen generates a temporary project, runs a recipe inside it, and cleans up:

just gen build                  # Build docs (with examples)
just gen test                   # Run tests
just gen lint                   # Run linters
just examples=false gen build   # Without examples

See the Contributing Guide for complete development and testing documentation.

License

MIT License - see the LICENSE file for details.

Made by stateful-y

About

A Python package template repository based on copier that uses uv, ruff, ty, nox, and mkdocs

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Contributors

Languages