Skip to content

Instantly share code, notes, and snippets.

@disler
Created February 12, 2025 12:40
Show Gist options
  • Save disler/d8d8abdb17b2072cff21df468607b176 to your computer and use it in GitHub Desktop.
Save disler/d8d8abdb17b2072cff21df468607b176 to your computer and use it in GitHub Desktop.
uv - single file script poc
# /// script
# dependencies = [
# "requests<3",
# "rich",
# ]
# ///
# https://docs.astral.sh/uv/guides/scripts/#declaring-script-dependencies
import requests
from rich.pretty import pprint
resp = requests.get("https://peps.python.org/api/peps.json")
data = resp.json()
pprint([(k, v["title"]) for k, v in data.items()][:10])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment