What is uv

If you are following the recent developments in the python ecosystem, there is one new tool that stands out by far and might change the way you work with python. I am talking about uv, a super fast all-in-one python project management tool to replace pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and more.

Background

uv is an open source tool developed by astral, a venture-backed company, which has dedicated its mission to deliver “Next Gen Python Tooling”. Another well known tool made by astral is ruff, a super fast python linter and formatter written in rust.

Initially Armin Ronacher started rye as a “cargo for python” to unify the fragmented python tooling landscape (for a great overview check out this talk by Anna-Lena Popkes). Due to common ideas of Armin and Charlie Marsh (the founder of astral) regarding what the python tooling landscape should look like, astral took stewardship of rye with the release of uv in February 2024. With the plan that uv will become that unified successor project.

More information can be found in these blog posts from Armins blog and astrals blog.

Numbers

According to a talk Charlie Marsh gave at Euro Rust 2024 in October, 13.3% of all packages downloaded from PyPi were downloaded with uv at that time. In absolute numbers that are around a quarter billion downloads. uv itself is downloaded ~28.1M/month and also its github star history shows a steady growth since its release and currently counts over 36.1k stars.

Star_History_Chart

uv’s star count recently even surpassed astrals other well established tool ruff (34.6k stars).

Installation

There are many ways to install uv, on Linux/Mac the standalone installer can be installed with:

curl -LsSf https://astral.sh/uv/install.sh | sh

and on Windows using powershell with:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

I prefer using a system package manager like scoop for Windows:

scoop install main/uv

or homebrew for Mac:

brew install uv

For a complete list of all installation ways you can check the docs.

Features

Python version management

uv manages python runtimes for you. These python versions are downloaded from the python-build-standalone repository, which came under the stewardship of astral in December 2024 (for more information check this blog post). You can list your installed version with uv python list and can install new versions e.g. python 3.13.1 with uv python install 3.13.1.

On a project level uv creates a .python-version file which defines the python version uv uses for your current project. You can update that file with uv python pin <VERSION>.

Python project management

A new project can be initialized with uv init <PROJECT_NAME>. This creates a basic skeleton and can be extended and customized with various flags. With uv add <DEPENDENCY> uv adds the latest dependency to the pyproject.toml and installs all dependencies in a newly created virtual environment .venv-folder located at the root of your project.

uv also supports dependency groups (see also PEP735), this allows to add dependencies for development like pytest to be added into your dev dependency group with uv add --group dev pytest. To synchronize the virtualenv with the declared dependencies uv sync can be used.

Tool management and uvx

When installing python cli-tools, pipx was the way to go to install those in an isolated environment. uv also supports managing such kind of tools. To install a new tool you can use uv tool install <PACKAGE>. A list of all installed tools can be displayed with uv tool list.

Another nice feature of uv is uvx, for example uvx ruff, this is basically a shortcut for uv tool run ruff and installs and executes ruff in a temporary isolated environment. Since uv caches installed packages in a global cache, the subsequent invocation of uvx ruff is basically instant.

This also makes spinning up a python REPL with a certain package installed a single command uvx --from <PACKAGE> python. Let’s say you are developing a new application and are still working on the feature branch in your git repository and want to show your colleague the current state, uvx got you covered. With uvx git+<GIT_REPO_LINK>@<BRANCH> you can directly run the application from the specified branch, alternatively you can even provide a tag or commit-hash.

What are uv aiting for

I can highly recommend trying out uv for your next project or transitioning your existing projects to uv to profit from the speed advantages uv provides.

astral also has extensive documentation on how to integrate uv with popular tools like docker, github-actions, jupyter, AWS Lambda and more, which makes adopting uv a breeze.

But… One thing to keep in mind is, that astral is a venture-backed company and needs to generate revenue at some point. At the moment uv and ruff are free and open source under MIT License. The current plan to generate revenue appears to involve astral monetizing additional services build on top of their already available tools, rather than making a license change at some point (Charlie responds to a audience question here).

The open-source community has seen license changes before, as with the IaC tool terraform by hashicorp (announcement). This led to the creation of opentofu as an open source fork of terraform.

One of the next tools coming from astral might be “red-knot”, a type-checker that will be integrated into ruff and I am curious, what other tools astral will build for the python ecosystem.

With that, now is the perfect time to explore uv and experience its benefits for yourself. Whether you are looking for speed, flexibility, or seamless integration, uv delivers.