All TIL notes

Wednesday, 2 September 2026 · 1 min read

uv can run a script with inline dependencies

PEP 723 metadata at the top of a script and `uv run script.py` does the rest — no venv, no requirements file.

pythonuv

Put this at the top of a script:

# /// script
# requires-python = ">=3.13"
# dependencies = ["httpx", "rich"]
# ///

Then uv run script.py. uv resolves and caches the dependencies in an isolated environment on first run. Perfect for one-off tools that live in a repo without becoming part of the project.