UV: Python package manager. #964
Labels
Git-Repo
Source code repository like gitlab or gh
github
gh tools like cli, Actions, Issues, Pages
python
Python code, tools, info
software-engineering
Best practice for software engineering
uv
An extremely fast Python package and project manager, written in Rust.
Installing Trio's dependencies with a warm cache.
Highlights
pip
,pip-tools
,pipx
,poetry
,pyenv
,twine
,virtualenv
, and more.pip
.curl
orpip
.uv is backed by Astral, the creators of Ruff.
Installation
Install uv with our standalone installers:
Or, from PyPI:
# With pip. pip install uv
# Or pipx. pipx install uv
If installed via the standalone installer, uv can update itself to the latest version:
See the installation documentation for details and alternative installation methods.
Documentation
uv's documentation is available at docs.astral.sh/uv.
Additionally, the command line reference documentation can be viewed with
uv help
.Features
Project management
uv manages project dependencies and environments, with support for lockfiles, workspaces, and more, similar to
rye
orpoetry
:See the project documentation to get started.
uv also supports building and publishing projects, even if they're not managed with uv. See the publish guide to learn more.
Tool management
uv executes and installs command-line tools provided by Python packages, similar to
pipx
.Run a tool in an ephemeral environment using
uvx
(an alias foruv tool run
):Install a tool with
uv tool install
:See the tools documentation to get started.
Python management
uv installs Python and allows quickly switching between versions.
Install multiple Python versions:
Download Python versions as needed:
Use a specific Python version in the current directory:
See the Python installation documentation to get started.
Script support
uv manages dependencies and environments for single-file scripts.
Create a new script and add inline metadata declaring its dependencies:
Then, run the script in an isolated virtual environment:
See the scripts documentation to get started.
A pip-compatible interface
uv provides a drop-in replacement for common
pip
,pip-tools
, andvirtualenv
commands.uv extends their interfaces with advanced features, such as dependency version overrides, platform-independent resolutions, reproducible resolutions, alternative resolution strategies, and more.
Migrate to uv without changing your existing workflows — and experience a 10-100x speedup — with the
uv pip
interface.Compile requirements into a platform-independent requirements file:
Create a virtual environment:
Install the locked requirements:
See the pip interface documentation to get started.
Platform support
See uv's platform support document.
Versioning policy
See uv's versioning policy document.
Contributing
We are passionate about supporting contributors of all levels of experience and would love to see you get involved in the project. See the contributing guide to get started.
Acknowledgements
uv's dependency resolver uses PubGrub under the hood. We're grateful to the PubGrub maintainers, especially Jacob Finkelman, for their support.
uv's Git implementation is based on Cargo.
Some of uv's optimizations are inspired by the great work we've seen in pnpm, Orogene, and Bun. We've also learned a lot from Nathaniel J. Smith's Posy and adapted its trampoline for Windows support.
Suggested labels
None
The text was updated successfully, but these errors were encountered: