UV — Ultra-Fast Python Package Manager
Rust-powered Python package and project manager. 10-100x faster than pip. Drop-in replacement with lockfiles, virtual environments, and Python version management.
What it is
UV is a Python package and project manager written in Rust by the team behind Ruff. It serves as a drop-in replacement for pip, pip-tools, pipenv, poetry, pyenv, and virtualenv -- all in a single binary. UV handles dependency resolution, lockfile generation, virtual environment creation, and even Python version installation.
Developers tired of juggling multiple Python tooling layers benefit most. If you have ever waited minutes for pip to resolve dependencies on a large project, UV cuts that to seconds.
How it saves time or tokens
UV achieves 10-100x speed improvements over pip through Rust's performance and a global dependency cache. Instead of re-downloading packages for every virtual environment, UV hardlinks from a shared cache. Lockfiles (uv.lock) ensure reproducible installs across machines without the guesswork of pip freeze. The single-binary design also eliminates the bootstrap problem -- no need for pip to install pip.
How to use
- Install UV with a single command:
curl -LsSf https://astral.sh/uv/install.sh | sh
- Create a new project with a virtual environment and lockfile:
uv init my-project
cd my-project
uv add requests flask
- Run your application inside the managed environment:
uv run python app.py
UV resolves, installs, and locks dependencies automatically. No pip install, no source venv/bin/activate, no manual requirements.txt management.
Example
# Install a specific Python version and pin it
uv python install 3.12
uv python pin 3.12
# Add dev dependencies separately
uv add --dev pytest ruff mypy
# Sync all dependencies from lockfile (CI-friendly)
uv sync --frozen
# Run a one-off script without polluting your environment
uv run --with httpx python -c 'import httpx; print(httpx.get("https://httpbin.org/ip").json())'
Related on TokRepo
- Python CLI Tools -- Browse coding tools and developer utilities on TokRepo
- Automation Tools -- Workflow automation resources for developers
Key considerations
When evaluating UV for your workflow, consider the following factors. First, assess whether your team has the technical prerequisites to adopt this tool effectively. Second, evaluate the maintenance burden against the productivity gains. Third, check community activity and documentation quality to ensure long-term viability. Integration with your existing toolchain matters more than feature count alone. Start with a small pilot project before rolling out across the organization. Monitor resource usage during the initial adoption phase to identify bottlenecks early. Document your configuration decisions so team members can onboard independently.
Common pitfalls
- UV uses
pyproject.tomlas the single source of truth. Mixingrequirements.txtworkflows with UV can cause confusion -- commit to one approach. - The global cache can grow large on machines with many projects. Run
uv cache cleanperiodically to reclaim disk space. - Some legacy packages with complex C extensions may still require system-level build tools (gcc, libffi-dev) even though UV handles the Python side.
Frequently Asked Questions
Run 'uv init' in your existing project directory. UV reads your existing requirements.txt or pyproject.toml and generates a uv.lock file. Replace 'pip install -r requirements.txt' with 'uv sync' in your CI pipeline. The migration is incremental -- UV understands pip's formats.
Yes. UV provides native binaries for Windows, macOS, and Linux. On Windows, install via 'powershell -c irm https://astral.sh/uv/install.ps1 | iex' or through winget, scoop, and chocolatey. Virtual environment activation uses the same 'uv run' command across platforms.
Yes. UV downloads and manages Python installations directly. Run 'uv python install 3.11 3.12 3.13' to install multiple versions, then 'uv python pin 3.12' to set the project default. No pyenv or system package manager required.
UV reads and writes standard pyproject.toml following PEP 621. Projects already using pyproject.toml for metadata need minimal changes. UV adds its own sections for tool-specific config but respects the existing standard fields.
UV is significantly faster than Poetry for dependency resolution and installation. Both use lockfiles for reproducibility. UV additionally manages Python versions and virtual environments, while Poetry requires external tools for those. UV's Rust implementation gives it a raw speed advantage.
Citations (3)
- UV GitHub Repository— UV is 10-100x faster than pip
- UV Official Documentation— UV replaces pip, pip-tools, pipenv, poetry, pyenv, and virtualenv
- Astral Blog— UV uses Rust for performance and a global dependency cache
Related on TokRepo
Source & Thanks
Created by Astral. Licensed under Apache 2.0 / MIT. astral-sh/uv — 35K+ GitHub stars
Discussion
Related Assets
Moodle — Open-Source Learning Management System
The most widely used open-source learning platform, providing course management, assessments, and collaboration tools for educators and organizations worldwide.
Sylius — Headless E-Commerce Framework on Symfony
An open-source headless e-commerce platform built on Symfony and API Platform, designed for developers who need a customizable and API-first commerce solution.
Akaunting — Free Self-Hosted Accounting Software
A free, open-source online accounting application built on Laravel for small businesses and freelancers to manage invoices, expenses, and financial reports.