uv¶
uv is an extremely fast Python package (to replace pip) and project manager (for virtual env).
Value propositions¶
- uv manages project dependencies and environments.
- uv installs different Python version and allows switching between versions.
- optimize dependencies caching and avoid deduplication
See features list and basic commands
Getting started:¶
- installation
-
Common commands:
uv python install: Install Python versions. uv python list: View available Python versions. uv python find: Find an installed Python version. uv run: Run a script. uv add --script: Add a dependency to a script uv remove --script: Remove a dependency from a script
-
Work with virtual environment
- Work with tools to publish as python package
uv tool run: Run a tool in a temporary environment. uv tool install: Install a tool user-wide. uv tool uninstall: Uninstall a tool. uv tool list: List installed tools. uv tool update-shell: Update the shell to include tool executables.
Some interesting things to do¶
- Check version:
uv version
- Use different python version
- Use / create project (create a
pyproject.toml
) See project guide. - Run script in the context of a project to get access to modules:
uv run python ...
- Manage dependencies:
uv add --script
oruv remove --script
- Full CLI reference
Projects I am using it¶
- Move to real-time with Shift left to develop a CLI