Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could do that with uv.

  # /// script
  # dependencies = [
  #   "requests<3",
  #   "rich",
  # ]
  # ///
  
  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])


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: