# Simple, Modern Python


[Joshua Levy](https://x.com/ojoshe/) recently shared his enthusiasm for `uv`, Astral's Python package manager, along with a practical template for new projects using this tool. [His thread on X](https://x.com/ojoshe/status/1901380005084700793) highlights both technical advantages and philosophical approaches to modern Python development.

## Key Points from Levy's UV Template

Levy has created a [simple-modern-uv](https://github.com/jlevy/simple-modern-uv), [Copier](https://copier.readthedocs.io/en/stable/) template that combines minimal but essential tools for Python projects:

- Uses [uv](https://pydevtools.com/handbook/reference/uv.md) for package management
- Incorporates [ruff](https://pydevtools.com/handbook/reference/ruff.md) for linting and formatting (replacing Black and isort)
- Includes [mypy](https://pydevtools.com/handbook/reference/mypy.md), [codespell](https://github.com/codespell-project/codespell), and [pytest](https://pydevtools.com/handbook/reference/pytest.md)
- Provides [GitHub Actions](https://docs.github.com/en/actions) configuration
- Uses [Copier](https://copier.readthedocs.io/en/stable/) for template management

## Why uv Matters Beyond Speed

While uv's performance is impressive, Levy emphasizes that its real value lies in dependency management fundamentals:

- Decoupling downloads from execution: uv's shared cache means running Python applications is as simple as knowing their name—no installation step required
- Simplifying dependency management: More reliable dependency resolution and environment handling
- Standardizing scripts: Support for PEP 723 inline script dependencies allows scripts to be self-contained with their own dependencies and Python version requirements

## Template Design Philosophy

Levy advocates for the "3 Ms" in project templates:
- Minimalist: Including only essential components
- Modern: Leveraging current best practices and tools
- Maintained: Regularly updated to reflect ecosystem changes

He also highlights [Copier](https://copier.readthedocs.io/en/stable/) as an underrated tool that enables maintaining multiple projects from a template while allowing customization and template updates.

## Additional Recommendations

- Dynamic versioning with Git tags using [uv-dynamic-versioning](https://github.com/ninoseki/uv-dynamic-versioning) plugin
- Using Ruff's formatter and linter instead of separate tools like Black and isort
- Maintaining a pragmatic middle ground between inflexible formatting (Black) and overly complex linting configurations

This template represents a streamlined approach to Python development that leverages uv's capabilities to simplify the development workflow while maintaining modern best practices.
