A Python package and project manager. It provides uv and uvx, manages a shared virtual environment via a slot, and aliases pip to uv pip for compatibility.
A minimal workshop:
# workshop.yaml
name: python-app
base: ubuntu@24.04
sdks:
- name: uv
channel: latest/stable
actions:
lint: |
uv run ruff check
uv run ruff format --diff
test: uv run pytest "$@"
format: |
uv run ruff check --fix
uv run ruff format-
No prerequisite SDKs are required.
-
Your Python project (with a
pyproject.tomlorrequirements.txt) should be in your project directory:git clone <YOUR_REPO_URL>
-
On launch, the SDK creates a virtual environment and sets
UV_LINK_MODE=copy.
Once the workshop is ready:
workshop shell
uv run pytestuv run syncs dependencies automatically on the first invocation. Downloaded
packages are stored in the uv cache, which is mapped to your host via the
cache mount plug. Subsequent runs thus reuse cached packages.
Also, uv run and uv sync by default use a .venv in the project directory,
separate from the shared slot venv at /home/workshop/uv-venv.
To use the shared slot venv, activate it in ~/.profile within the workshop
(for instance, using an in-project SDK beside this one).
From within the workshop shell:
workshop shell
uv add requestsWhen you run pip install, it transparently runs uv pip install. Use
whichever command you prefer.
The SDK sets UV_LINK_MODE=copy automatically because the persistent cache
mount does not support hardlinks.
- Interface:
mount - Workshop target:
/home/workshop/.cache/uv - Purpose: Persists uv package cache between workshop updates.
- Interface:
mount - Workshop source:
/home/workshop/uv-venv - Purpose: Other SDKs can plug into this slot to access Python packages installed by uv.
- uv community: GitHub Discussions
- Workshop forum: Discourse
- Please review our Code of Conduct before participating.
All contributions, including code, documentation updates, and issue reports, are welcome!
- See
CONTRIBUTING.mdfor guidelines. - Open issues or pull requests on the official repository.
Copyright 2025 Canonical Ltd.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 (LGPLv2.1) as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
uv is licensed under the MIT License.