Run inline scripts with uv, declaring dependencies in the script metadata. List only PyPI packages: stdlib modules (json, os, re) aren't on PyPI, so listing them makes uv fail to resolve the script. Target Python 3.12+.
uv run --no-project -q --script - < <(cat <<'EOF'
# /// script
# requires-python = ">=3.12"
# dependencies = ["httpx"]
# ///
import httpx
print(httpx.get("https://api.github.com/zen").text)
EOF
)