界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
数据与研究 · SKILL.md

uv

uv

【数据与研究】Use `uv` instead of pip/python/venv. Run scripts with `uv run script.py`, add deps with `uv add`, use inline script metadata for standalone scripts.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

Mmitsuhiko / agent-stuffApache-2.0

技能说明

GitHub

name: uv description: "Use uv instead of pip/python/venv. Run scripts with uv run script.py, add deps with uv add, use inline script metadata for standalone scripts."

Quick Reference

uv run script.py                   # Run a script
uv run --with requests script.py   # Run with ad-hoc dependency
uv run python -m ast foo.py >/dev/null  # Verify syntax without writing __pycache__
uv add requests                    # Add dependency to project
uv init --script foo.py            # Create script with inline metadata

Inline Script Dependencies

# /// script
# requires-python = ">=3.12"
# dependencies = ["requests"]
# ///

See scripts.md for full details on running scripts, locking, and reproducibility.

Build Backend

Use uv_build for pure Python packages:

[build-system]
requires = ["uv_build>=0.9.28,<0.10.0"]
build-backend = "uv_build"

See build.md for project structure, namespaces, and file inclusion.

我的收藏