| name | using-uv |
| description | Python package and project management with UV. Use when creating Python scripts, initializing projects, or managing dependencies. |
UV
UV is a fast Python package manager. Two modes:
Scripts vs Projects
Use scripts when:
- Single .py file
- Quick utility, one-off task
- No shared dependencies across files
Use projects when:
- Multiple files, modules, or packages
- Team collaboration
- Need reproducible environments
- Building a library or application
Scripts
Standalone Python files with inline dependencies (PEP 723).
import requests
from rich import print
Run: uv run script.py
See references/scripts.md for full guide.
Projects
Structured Python with pyproject.toml and lockfile.
uv init myproject
cd myproject
uv add requests
uv run python main.py
Key files:
pyproject.toml - metadata and dependencies
uv.lock - exact versions for reproducibility
.python-version - Python version
See references/projects.md for full guide.
Common Patterns
uv run pytest
uv add --dev pytest
uvx ruff check .
uv run --with rich script.py