Summery
uv is a fast Python package and project manager. Think of it as a tool that combines parts of pip, venv, and pipx, with automatic dependency handling. The useful feature is running a standalone Python script with its own dependencies, without manually creating or activating a virtual environment.
Installation
curl -LsSf https://astral.sh/uv/install.sh | sh
Commands
uv run script.py - Run a script and install its declared dependencies
uv run --with requests script.py - Run with an additional dependency
uv add requests - Add a dependency to a project
uv sync - Install project dependencies
uv tool run ruff - Run a CLI tool in an isolated environment, similar to pipx run
References
Similar concepts Installing Python modules and libraries