uv 0.3: One command line to rule them all (almost)

uv 0.3: One command line to rule them all (almost)

August 21, 2024

Yesterday, Charlie Marsh and his team at Astral released uv 0.3.0.

For those who may have missed it, uv was released earlier this year primarily as a blazing-fast replacement for pip for installing Python packages.

This new release provides new documentation and a host of new functionality.

Charlie Marsh and Simon Willison have written helpful posts about the new functionality.

I thought it’d be helpful to illustrate how the current uv functionality compares to existing tools:

uv CommandAlternative to
uv pippip and pip-tools
uv venvvenv and virtualenv
uv toolpipx
uv initPoetry/PDM (partially)
uv pythonpyenv
uv runnothing!

uv only partially replicates Poetry and PDM because it has yet to implement package building and publishing, only project management. However, they provide simple commands for publishing using existing tools and a uv project.

Several aspects of this release particularly stand out to me:

  • uv tool and it’s alias uvx as an alternative pipx. I rely on pipx to install command line tools on my system (tox, ruff, uv, yamllint, mypy, etc). uvx combines this with the blazing fast uv installer, adding new functionality like the ability to run a command without having installed it first (e.g. uvx ruff without first running uv tool install ruff).
  • uv python to manage and install Python versions. Installing Python has long been a challenge with disparate solutions (python.org installers, homebrew, conda, pyenv, asdf, …); choosing an installation method has boggled the mind of many aspiring data scientists. More important than the ability to install particular versions, uv does not require the user to install Python explicitly! Because uv is not written in Python, you can install it without having Python on your machine, and if it cannot find Python, it will quickly and automatically install Python when it needs it.
  • uv is seeking to be standards compliant. While uv is breaking much new ground, the team is seeking to adopt the standards provided by the Python PEP process. For example, the new uv run command which can execute a standalone Python script without the user managing a virtual environment or dependencies implements PEP 723 for inline script metadata.

Despite uv adding to the complexity of choosing Python developer tooling by adding yet another option, I am optimistic that within a few years, it will be the default tool to recommend to Python developers for Python installation, project management, packaging, and environments.

Last updated on

Please submit corrections and feedback...