Skip to content

Instantly share code, notes, and snippets.

@brenorb
Last active September 3, 2025 23:03
Show Gist options
  • Save brenorb/60f7934a6a66bd0cb34f05956379e0b9 to your computer and use it in GitHub Desktop.
Save brenorb/60f7934a6a66bd0cb34f05956379e0b9 to your computer and use it in GitHub Desktop.
self contained executable python script example
#!/usr/bin/env -S uv run --script --python 3.12.3
# /// script
# dependencies = ['httpx', 'rich']
# ///
# To make it executable: chmod +x executable_uv_weather.py
import httpx, rich
print(httpx.get("https://wttr.in/?format=3").text)
# Run with `./executable_uv_weather.py` on terminal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment