technologies · difficulty ◆◆
uv — the ultra-fast Python package & project manager
One tool to install Python, manage environments, and ship packages — without the slow parts.
Python packaging has a dirty secret: most of it is waiting. pip resolves, downloads, and installs sequentially, and every virtualenv is a fresh world you have to rebuild. uv is a single Rust binary that does all of it in parallel — and it is not a little faster, it is usually 10 to 100 times faster.
AI-generated draft · reviewed and editedThis text was generated with AI as a first draft, then reviewed and edited by the author, who holds editorial responsibility for it.$ uv- 0.12.5
- installed here
- 23
- top-level commands
- Rust
- written in
- Feb 2024
- released
uv --version
uv --help
Astral
public launch
What it is
uv is a single, compiled Rust binary that replaces the Python ecosystem’s usual grab-bag of tools: pip and pip-tools for dependencies, virtualenv for environments, pyenv for installing Python versions, Poetry for project management, and venv for isolation. You install one binary and it handles installing Python itself, creating environments, resolving and locking dependencies, running tools, and publishing packages. Everything shares one fast core written in Rust.
Why it matters
The failure mode it kills is waiting. Python’s classic workflow chains slow tools: pip resolves packages one at a time over the network, then builds each one in sequence; creating an environment means waiting again. On a large project that is minutes of dead time on every setup. uv parallelizes resolution and download, caches aggressively on disk, and reuses artifacts across projects. A cold install that took pip sixty seconds often takes uv two or three. When you do this on a CI machine or a teammate’s laptop dozens of times a day, the minutes add up to hours.
How it fits your stack
uv is installed in this environment at version 0.12.5 and ships 23 top-level commands (auth, run, init, add, remove, version, sync, lock, export, tree, format, check, audit, tool, python, pip, venv, build, publish, workspace, cache, self, help). It manages the Python interpreter itself (uv python install 3.12 downloads a standalone build), creates virtual environments (uv venv), adds and locks dependencies with a uv.lock file (uv add / uv lock), runs commands in the project environment (uv run), and even publishes packages (uv publish). It is a drop-in for pip too: uv pip install works inside any existing virtualenv, so you can adopt it gradually without rewriting a project.
Example
$ uv init hello-uv && cd hello-uv && uv add requestsInitialized project `hello-uv` at `/home/kmail/.hermes/cache/scratch/adsense-fix/uvdemo/hello-uv`
Using CPython 3.13.13
Creating virtual environment at: .venv
Resolved 6 packages in 112ms
Building hello-uv @ file:///home/kmail/.hermes/cache/scratch/adsense-fix/uvdemo/hello-uv
Built hello-uv @ file:///home/kmail/.hermes/cache/scratch/adsense-fix/uvdemo/hello-uv
Prepared 1 package in 10ms
Installed 6 packages in 2ms
+ certifi==2026.7.22
+ charset-normalizer==3.5.2
+ hello-uv==0.1.0 (from file:///home/kmail/.hermes/cache/scratch/adsense-fix/uvdemo/hello-uv)
+ idna==3.20
+ requests==2.34.2
+ urllib3==2.8.0uv init scaffolds a project, and uv add resolves and installs in the same step, with no separate venv or pip-tools command. The absolute paths above are from this machine; yours will differ.
$ uv run python -c "import requests; print(requests.get('https://example.com').status_code)"200uv run resolves the lockfile and runs the command inside the project environment. Notice what is absent: with the environment already in sync, uv prints nothing but the program's own output. The Resolved / Prepared / Installed lines appear only when there is work to do, which the first example in this section shows.
$ uv python install 3.12Downloading cpython-3.12.14-linux-x86_64-gnu (download) (32.6MiB)
Downloaded cpython-3.12.14-linux-x86_64-gnu (download)
Installed Python 3.12.14 in 2.34s
+ cpython-3.12.14-linux-x86_64-gnu (python3.12)uv installs a standalone CPython build itself: no pyenv, no system package manager, 32.6 MiB and 2.34 seconds here. Pin a version per project with uv python pin, which writes .python-version. The pin has to agree with the project's requires-python, because in a project scaffolded for 3.13 the same command stops with the error that the requested Python version 3.12 is incompatible with the project requires-python value of >=3.13.
$ uv tool install ruffPrepared 1 package in 537ms
Installed 1 package in 9ms
+ ruff==0.17.0
Installed 1 executable: ruffuv tool installs a CLI tool into its own isolated environment and puts the executable on your PATH, like pipx but faster.
Common flags
- uv init
- scaffold a new project with pyproject.toml
- uv add <pkg>
- add a dependency, create the venv, and write uv.lock
- uv run <cmd>
- run a command inside the project environment
- uv lock
- generate/update the uv.lock lockfile
- uv sync
- install the environment to match uv.lock exactly
- uv python install <ver>
- download and install a standalone Python build
- uv tool install <pkg>
- install a CLI tool in an isolated env (like pipx)
- uv publish
- build and upload a package to PyPI
History
Origin
uv was built by Astral, the company Charlie Marsh founded after Ruff took the Python linting world by storm. Marsh’s thesis was that Python tooling did not have to be slow — most of it was slow because it was written in Python and ran one step at a time. Ruff proved the point for linting; uv applied the same Rust-and-parallelism approach to packaging. uv launched publicly in February 2024 and was adopted at remarkable speed, becoming the default package manager for many projects and CI pipelines within its first year.
The name and the philosophy
The name is deliberately short: one syllable, lowercase, quick to type on a command line and easy to stop thinking about. Astral's first tool, Ruff, is named after a bird; uv carries no such story. The philosophy is to consolidate the Python toolchain - instead of pip plus virtualenv plus pyenv plus pip-tools plus Poetry, one binary does resolution, locking, environment management, interpreter management, and publishing, all backed by the same fast, parallel, on-disk-cached core.
Growth & ecosystem
uv has become a fixture of modern Python setups, appearing in countless boilerplates, CI templates, and tutorials as the default way to manage dependencies. It also powers downstream tooling: many projects use uv run and uv.lock as the backbone of reproducible environments. Version 0.12.5, installed here, reflects a release cadence far faster than pip's - 0.13.1 was already on PyPI by October 2026 - with new commands and refinements landing continuously.
Under the hood
Why it is so much faster
The speed is not one trick; it is three working together. First, resolution is parallel and uses a fast, in-memory resolution algorithm rather than pip’s sequential backtracking over the network. Second, downloads are concurrent — uv fetches many wheels at once instead of one at a time. Third, uv keeps a global, content-addressed cache on disk, so once a wheel is downloaded it is reused across every project and every rebuild, never re-fetched. The result is that installs are dominated by disk reads, not network waits.
The lockfile
uv.lock is a deterministic, universal lockfile. It records the exact version, hash, and source of every dependency and transitive dependency, so that uv sync reproduces the identical environment on any machine — including resolving platform-specific wheels correctly. Because it is a single committed file, teams and CI get reproducibility out of the box, the same way package-lock.json or Cargo.lock do in other ecosystems.
Interpreter management
uv treats the Python interpreter as just another managed artifact. Instead of installing Python through a system package manager or a separate tool like pyenv, uv python install downloads a standalone build and uv python pin records which version a project uses in a .python-version file. This removes a whole class of "it works on my machine" bugs, because the interpreter is pinned and reproducible like every dependency.
Fun facts
Pros & cons
pros
- + Dramatically faster installs, resolution, and environment creation (often 10-100x)
- + One binary replaces pip, virtualenv, pyenv, pip-tools, and Poetry
- + Deterministic uv.lock lockfile for reproducible environments and CI
- + Manages the Python interpreter itself, not just packages
- + Drop-in uv pip / uv venv / uv run commands mean gradual adoption
cons
- − Young project — API and lockfile format still evolving
- − Some niche/exotic packaging edge cases less battle-tested than pip
- − Adds another tool to learn if you are comfortable with the classic stack
- − The speed advantage is most dramatic on large cold installs; trivial projects feel similar
Takeaways
- 1Scaffold and resolve in one step: `uv init && uv add requests`
- 2Run inside the project env without activating it: `uv run python script.py`
- 3Install Python itself, no pyenv: `uv python install 3.12`
- 4Add a CLI tool safely: `uv tool install ruff`
- 5Try it on one existing project first with the drop-in `uv pip` commands
