`uv` is a [[Python]] [[Packaging in Python|packaging]] tool, developed by [[Astral]], that aims to be extremely fast and provide end to end solutions for Python projects, [[Python Environment|Python environments]], single-file scripts and even Python management itself. They try to position themselves as "_[[Cargo]], for [[Python]]_".
`uv` provides:
- **End-to-end project management**: an alternative to [[Poetry]] or [[Rye]], uv can generate and install cross-platform lockfiles.
- `uv init`: creates a basic project layout.
- `uv run`
- `uv lock`
- `uv sync`
- **Tool management**: it can install command-line tools in isolated virtual environments and execute one-off commands without explicit installation, making it an alternative to [[pipx]]
- `uv tool install`
- `uv tool run` / `uvx`: Run the tool without any previous installation instruction. It can also include dependencies using `--with`; for example: `uvx --with pandas --with seaborn jupyter lab` will spin a Jupyter Lab instance with some packages available.
- **Python installation**: it can bootstrap and install different Python versions, making it an alternative to [[pyenv]].
- `uv python install`
- **Script execution**: manage hermetic, single-file Python scripts using inline dependency metadata based on PEP 723.
- `uv run`