uv-python-workflow
Original:🇺🇸 English
Translated
Use uv as the exclusive Python package and environment manager. Use this skill when installing packages, syncing environments, running scripts, writing Dockerfiles, or doing any Python dependency management — never pip, pip-compile, or virtualenv directly.
19installs
Sourcemitodl/agent-kit
Added on
NPX Install
npx skill4agent add mitodl/agent-kit uv-python-workflowTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →uv Python Workflow
All Python dependency and environment management in this codebase uses exclusively.
uvPackage management
- Add dependencies:
uv add <package> - Remove dependencies:
uv remove <package> - Install/sync the current project:
uv sync - Run a command inside the project environment:
uv run <command> - Never use ,
pip install, or barepip-compile.python -m venv
Workspace layout
Projects may be organized as a workspace. Code locations managed by
do not use workspaces — they rely on the workspace instead.
uvdguvdgDocker / container images
When building a Python app inside a Docker image, create a relocatable virtual
environment so it works after the image layers are assembled:
dockerfile
RUN uv venv --relocatable /app/.venv
RUN uv sync --frozen --no-devDo not mount (or any shared library) as a volume at
runtime. Shared libraries are installed as build-time dependencies only.
ol-orchestrate-libRunning pre-commit and type checks
bash
uv run pre-commit run --all-files
uv run mypy <package>