uv

0.11.2 · active · verified Fri Mar 27

Extremely fast Python package and project manager written in Rust by Astral. Current version is 0.11.2 (Mar 2026). Replaces pip, pip-tools, pipx, poetry, pyenv, virtualenv, and twine in a single tool. Recommended install is the standalone installer or pipx — NOT pip install uv into a project venv. uv is a CLI tool, not a Python library to import.

Warnings

Install

Imports

Quickstart

uv init creates pyproject.toml. uv add writes deps + lockfile. uv run uses the project venv.

# Install uv (standalone installer)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Create a new project
uv init myapp
cd myapp

# Add dependencies (writes to pyproject.toml + uv.lock)
uv add fastapi uvicorn pydantic
uv add --dev pytest ruff black

# Run the project
uv run uvicorn main:app --reload

# Run tests
uv run pytest

# Sync environment from lockfile (like pip install -r)
uv sync

# Install a specific Python version
uv python install 3.12
uv python pin 3.12  # pins .python-version

# pip compatibility (drop-in for pip)
uv pip install requests
uv pip install -r requirements.txt
uv pip compile requirements.in  # like pip-tools

# Run tools without installing (like pipx run)
uvx ruff check .
uvx black .

view raw JSON →