I stumbled on uv
installing aider
so i had to have a look. The README.md on uv
repo describes it as:
- A single tool to replace pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and more.
- 10-100x faster than pip.
Installation Link to heading
Rust Link to heading
First, We need to make sure rustup
and install latest rustc
sudo apt install rustup
rustup update stable
uv Link to heading
Now we have rustc
installed, we build uv from git repo with cargo:
cargo install --git https://github.com/astral-sh/uv uv
uv self update
And we are golden.
Examples Link to heading
I tried the examples shipped with uv
. It can be used to initialize whole python project including .venv
.
$ uv init example
Initialized project `example` at `/home/user/example`
$ cd example
$ tree
.
├── main.py
├── pyproject.toml
└── README.md
uv
can be used to install packages directly.
$ uv add ruff
Using CPython 3.12.3 interpreter at: /usr/bin/python3.12
Creating virtual environment at: .venv
Resolved 2 packages in 442ms
Prepared 1 package in 501ms
Installed 1 package in 0.85ms
+ ruff==0.9.8
We can run stuff directly from venv with uv run
$ uv run ruff check
All checks passed!
lock
and sync
to update uv.lock
$ uv lock
Resolved 2 packages in 0.33ms
$ uv sync
Resolved 2 packages in 0.70ms
Audited 1 package in 0.02ms