An opinionated example for modern Python projects using best-in-class tooling.
Although this is not mean't to be used as a template directly, it is probably an okay starting point for greenfield projects.
- 📦 uv for blazingly fast package management and virtual environments and python version management
- ✨ Ruff for comprehensive linting and
formatting, configured with:
- Google-style docstring enforcement
- Type annotation checking
- Security checks via Bandit rules
- Import sorting
- And more!
- 🔍 Pyright in strict mode for robust static type checking
- 🏃 Pre-configured VS Code development environment extension recommendations for the tools
- 🔧 Task runner with Just for streamlined development
- Clone this repository:
git clone https://github.com/zenion/python-modern-example.git cd python-modern-example - Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh - Install Just:
uv tool install rust-just
Use the following commands via just:
just check- Run all checks and test (lint-check, format-check, type-check, and tests)just lint-check- Run Ruff linting checkjust lint-fix- Fix linting issues with Ruffjust format-check- Check code formatting with Ruffjust format- Format code with Ruffjust type-check- Run Pyright type checkingjust test- Run tests
This template includes recommended VS Code extensions for the best development experience:
- Python language support and debugging
- Ruff for linting and formatting
- Pyright/Pylance for type checking
- Additional helpful extensions for TOML, YAML, and more