Are you tired of waiting for hours to install your Python dependencies? And at night, while lying in your damp sheets, do you dream of a tool that would make this process ultra-fast and painless?
Look no further—uv is here for you!
Written in Rust by the creators of Ruff, uv is a Python installer and dependency resolver with astonishing speed. Designed as an alternative to pip and pip-tools, it offers performance up to 100 times greater while remaining as easy to use as pip. You can install it in a flash using curl, pip, pipx, or even Homebrew. Once set up, create your virtual environment with uv venv
, activate it, and you’re ready to install packages at record speed with intuitive commands like:
uv pip install flask
uv also handles the generation of locked dependency files to ensure your environment is reproducible on any platform.
With:
uv pip compile
you can generate a requirements.txt
file from various sources: requirements.in
, pyproject.toml
, setup.py
, or even standard input. To synchronize your environment with this file is straightforward:
uv pip sync requirements.txt
But that’s not all. uv is packed with advanced features to meet all your needs. You can define dependency version overrides, choose between different resolution strategies, manage Git dependencies with simplified authentication, and even install in arbitrary Python environments using the --python
option.
In terms of performance, the secret of uv lies in its smart use of caching. Already downloaded dependencies are stored optimally, and uv relies on information such as HTTP cache headers or Git hashes to determine if a dependency needs to be re-downloaded. You can finely control the cache behavior with options like --refresh
or --no-cache
.
Another undeniable advantage of uv is its advanced authentication management. Whether it’s for private Git repositories or package registries, uv allows multiple authentication methods: SSH, HTTPS with username and password or token, netrc file, and even your system’s keyring!
It’s also a cross-platform tool that works optimally on macOS, Linux, and Windows, with top-notch support for x86_64 architectures. And if you use a more exotic platform, there’s a good chance uv is available due to its broad compatibility.
This is definitely worth trying if you work with Python.
Discover more here: https://github.com/astral-sh/uv