# uv — Extremely Fast Python Package and Project Manager > uv is an all-in-one Python package and project manager written in Rust by Astral. It replaces pip, pip-tools, pipx, poetry, pyenv, and virtualenv with a single blazing-fast tool that is 10-100x faster than traditional Python packaging tools. ## Install Save in your project root: # uv — Extremely Fast Python Package and Project Manager ## Quick Use ```bash # Install uv curl -LsSf https://astral.sh/uv/install.sh | sh # Create a new project uv init my-project cd my-project # Add dependencies (10-100x faster than pip) uv add requests fastapi sqlalchemy # Run scripts uv run python main.py # Install a CLI tool (replaces pipx) uv tool install ruff # Use a specific Python version (replaces pyenv) uv python install 3.12 ``` ## Introduction uv is a revolutionary Python package and project manager that replaces an entire stack of tools with a single, blazing-fast binary. Built in Rust by Astral (the creators of Ruff), uv is 10-100x faster than pip for package installation and provides a unified workflow for managing Python versions, virtual environments, dependencies, and project builds. With over 83,000 GitHub stars in just over a year, uv is the fastest-growing tool in the Python ecosystem. It has rapidly become the recommended way to manage Python projects, endorsed by major frameworks and organizations. ## What uv Does uv replaces six separate tools in the Python ecosystem: pip (package installer), pip-tools (dependency resolver), virtualenv (environment creator), pyenv (Python version manager), pipx (tool installer), and poetry/PDM (project manager). One tool, one binary, dramatically faster. ## Architecture Overview ``` [uv (single Rust binary)] | +-------+-------+-------+ | | | | [Project] [Package] [Python] Management Install Version uv init uv add uv python uv run uv pip install uv build uv lock uv python uv publish list | [Replaces] pip + pip-tools + virtualenv + pyenv + pipx + poetry | [Performance] 10-100x faster than pip Global cache with hard links Parallel downloads ``` ## Self-Hosting & Configuration ```toml # pyproject.toml — uv project configuration [project] name = "my-app" version = "0.1.0" requires-python = ">= 3.11" dependencies = [ "fastapi>=0.115", "sqlalchemy>=2.0", "httpx>=0.27", ] [project.scripts] serve = "my_app.main:run" [tool.uv] dev-dependencies = [ "pytest>=8.0", "ruff>=0.8", "mypy>=1.13", ] ``` ```bash # Common uv workflows uv init my-app # Create new project uv add fastapi # Add dependency uv add --dev pytest # Add dev dependency uv lock # Generate lockfile uv sync # Install from lockfile uv run pytest # Run in virtual env uv run python main.py # Run scripts uv build # Build package uv publish # Publish to PyPI uv tool install ruff # Install CLI tool globally uv python install 3.12 # Install Python version ``` ## Key Features - **10-100x Faster** — Rust-powered package resolution and installation - **All-in-One** — replaces pip, virtualenv, pyenv, pipx, and poetry - **Universal Lockfile** — cross-platform reproducible dependency resolution - **Python Version Management** — install and switch Python versions - **Global Cache** — shared cache with hard links for zero-cost duplicates - **pip Compatible** — drop-in replacement for pip commands (uv pip install) - **Script Support** — inline script metadata for single-file dependencies - **Cross-Platform** — works on Linux, macOS, and Windows ## Comparison with Similar Tools | Feature | uv | pip + venv | Poetry | PDM | Conda | |---|---|---|---|---|---| | Speed | 10-100x faster | Baseline | 2-5x slower | Moderate | Slow | | Python Management | Yes | No (needs pyenv) | No | No | Yes | | Lockfile | Yes | No (pip-tools) | Yes | Yes | Yes | | Project Init | Yes | Manual | Yes | Yes | Yes | | Tool Install | Yes (pipx) | No (needs pipx) | No | No | No | | Single Binary | Yes | No | No | No | No | | Language | Rust | Python | Python | Python | Python/C | ## FAQ **Q: Can I replace pip with uv in existing projects?** A: Yes. Use "uv pip install" as a drop-in replacement for pip. For full project management, run "uv init" in an existing directory to generate a pyproject.toml and migrate. **Q: Does uv work with existing requirements.txt files?** A: Yes. "uv pip install -r requirements.txt" works exactly like pip. You can also migrate to uv lockfiles with "uv add" commands. **Q: How does uv achieve such speed?** A: uv is written in Rust with parallel downloads, a global package cache with hard-link deduplication, and an optimized dependency resolver. It avoids the overhead of Python startup and pip internals. **Q: Is uv stable enough for production?** A: Yes. uv follows semantic versioning and is used by major Python projects. Astral (backed by significant VC funding) is committed to long-term maintenance. ## Sources - GitHub: https://github.com/astral-sh/uv - Documentation: https://docs.astral.sh/uv - Website: https://astral.sh - Created by Charlie Marsh and Astral team - License: MIT / Apache-2.0 --- Source: https://tokrepo.com/en/workflows/34cb5a2b-3701-11f1-9bc6-00163e2b0d79 Author: AI Open Source