Python Developer Tooling Handbook logo

Python Developer Tooling Handbook

Subscribe
Archives
March 31, 2025

Simple, Modern Python

Joshua Levy 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 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, Copier template that combines minimal but essential tools for Python projects:

  • Uses uv for package management
  • Incorporates ruff for linting and formatting (replacing Black and isort)
  • Includes mypy, codespell, and pytest
  • Provides GitHub Actions configuration
  • Uses Copier 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 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 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.

Don't miss what's next. Subscribe to Python Developer Tooling Handbook:
Github
Powered by Buttondown, the easiest way to start and grow your newsletter.