astral-sh/uv
uv-scripts
crates/uv-scripts/ parses PEP 723 inline script
metadata — the # /// script block at the top of a single-file Python program.
Purpose
uv run script.py should be able to read the script's declared dependencies and required
Python version directly from a comment block, then resolve and run it in an ephemeral
environment.
Key abstractions
Pep723Item— the parsed metadata block.- Reading helpers that locate the block in arbitrary Python source.
See also
uv-workspace— overlappingpyproject.tomltypes.uv run— the user-facing consumer.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.