A template project for quickly starting Python projects with modern development practices.
This template provides a modern Python development environment with the following features:
- Ruff for code formatting and linting (replaces Black, isort, flake8)
- pytest for unit testing and coverage reporting
- uv for fast dependency management
- Type hints and PEP 257 compliant docstring enforcement
- GitHub Actions for CI/CD pipeline
- Release Please for automated version management based on Conventional Commits
- Modular project structure (src layout)
- Logging configuration included
python-project-template/
├── src/ # Source code
├── tests/ # Test code
├── .github/ # GitHub Actions workflows
├── .cursorrules # Cursor IDE AI assistant rules and guidelines
├── .mise.toml # mise tool version manager configuration (Python and tool versions)
├── pyproject.toml # Project configuration and dependencies
├── release-please-config.json # Release Please configuration for automated version management
├── .release-please-manifest.json # Release Please manifest file (auto-managed by release-please)
├── Makefile # Development commands
└── logging.conf # Logging configuration
make init # Initialize the project
make setup # Install dependencies
make setup-dev # Install dependencies with development packages$ make format # format python scripts
$ make lint # lint python scripts
$ make test # run unit testsSettings -> General -> Merge botton -> Allow squash merging ONLY

Settings -> Branches -> Branch protection rules -> Add rule
- Branch name pattern:
main - Require a pull request before merging & Require approvals
- Require status checks to pass before merging & Require branches to be up to date before merging
- Include administrators
- The python version should be aligned in
pyproject.tomland.mise.toml.