python-uv

Modern Python development with uv, the fast Python package and project manager. Covers project management (uv init, uv add, uv sync, uv lock), virtual environments, Python version management (uv python install/pin), script runners (uv run), tool management (uvx), workspace support for monorepos, and publishing to PyPI. Includes Python patterns for FastAPI, Pydantic, async/await, type checking, pytest, structlog, and CLI tools. Use when initializing Python projects, managing dependencies with uv, configuring pyproject.toml, setting up virtual environments, running scripts, managing Python versions, building monorepos with workspaces, containerizing Python apps, or writing modern Python with type hints.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "python-uv" with this command: npx skills add oakoss/agent-skills/oakoss-agent-skills-python-uv

Python uv

Overview

uv is an extremely fast Python package and project manager written in Rust, designed to replace pip, pip-tools, pipx, poetry, pyenv, and virtualenv. It provides unified project management, dependency resolution, Python version management, and tool execution with 10-100x speed improvements over traditional tools.

Key capabilities: Project initialization, dependency locking and syncing, Python version management, PEP 723 inline script dependencies, ephemeral tool execution via uvx, monorepo workspaces with shared lockfiles, and package building/publishing.

When to use: Python project initialization, dependency management, virtual environments, Python version pinning, running scripts with inline dependencies, monorepo workspaces, tool execution, publishing packages.

When NOT to use: Non-Python projects, conda-managed scientific computing environments with system-level binary dependencies, projects locked to legacy setup.py-only workflows.

Quick Reference

PatternCommand / APIKey Points
Init projectuv initCreates pyproject.toml and .python-version
Init libraryuv init --libCreates src/ layout with py.typed
Init scriptuv init --script example.pyPEP 723 inline metadata script
Add dependencyuv add requestsAdds to pyproject.toml, updates lockfile
Add dev dependencyuv add --dev pytestAdds to [dependency-groups] dev group
Add group dependencyuv add --group docs mkdocsCustom dependency groups
Add optionaluv add --optional postgres psycopgOptional extras for libraries
Remove dependencyuv remove requestsRemoves from pyproject.toml and lockfile
Lock dependenciesuv lockCreates/updates uv.lock
Upgrade in lockfileuv lock --upgrade-package requestsTargeted dependency upgrade
Sync environmentuv syncInstalls locked dependencies into .venv
Sync for CIuv sync --lockedFails if lockfile is stale
Sync frozenuv sync --frozenSkips lockfile verification
Run commanduv run python app.pyRuns in project virtual environment
Run scriptuv run script.pySupports PEP 723 inline dependencies
Run in packageuv run --package api pytestWorkspace-specific execution
Install Pythonuv python install 3.13Downloads and manages Python versions
Pin Pythonuv python pin 3.12Writes .python-version file
List Pythonsuv python listShows available and installed versions
Run tooluvx ruff check .Ephemeral tool execution
Tool with pluginsuvx --with mkdocs-material mkdocsEphemeral tool with extra packages
Install tooluv tool install ruffPersistent global tool install
Workspace[tool.uv.workspace]Monorepo multi-package support
Build packageuv buildCreates sdist and wheel in dist/
Publishuv publishUploads to PyPI with trusted publishing
Export depsuv export --format requirements-txtGenerate requirements.txt from lockfile

Common Mistakes

MistakeCorrect Pattern
Using pip install inside uv projectuv add to manage via pyproject.toml
Activating venv manually before uv runuv run handles venv activation automatically
Committing .venv/ to version controlAdd .venv/ to .gitignore, commit uv.lock
Not committing uv.lockAlways commit uv.lock for reproducible builds
Using uv sync without --locked in CIuv sync --locked ensures lockfile matches pyproject.toml
Running uv lock --upgrade routinelyOnly upgrade intentionally, use --upgrade-package for targeted updates
Mixing pip and uv dependency managementChoose one tool for the project consistently
Using uv pip install for project depsUse uv add/uv sync for managed projects
Forgetting --frozen for Docker buildsuv sync --frozen skips lockfile verification for faster builds
Creating venv manually in uv projectuv sync creates and manages .venv automatically
Using setup.py for new projectsUse pyproject.toml with a modern build backend
Not using py.typed in librariesuv init --lib includes it, required for typed packages

Delegation

  • Project scaffolding: Use Explore agent
  • Dependency audit: Use Task agent
  • Code review: Delegate to code-reviewer agent

If the docker skill is available, delegate containerization patterns to it. If the github-actions skill is available, delegate CI/CD pipeline configuration to it. If the api-testing skill is available, delegate API testing patterns to it. If the sentry-setup-logging skill is available, delegate error monitoring setup to it. If the pino-logging skill is available, delegate Node.js logging patterns to it (Python equivalent covered here with structlog).

References

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

github-cli

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

tanstack-cli

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

typescript-patterns

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

tanstack-devtools

No summary provided by upstream source.

Repository SourceNeeds Review