Self-contained Python scripts with uv
Link: http://blog.dusktreader.dev/2025/03/29/self-contained-python-scripts-with-uv/
Discussion: https://news.ycombinator.com/item?id=43519669
Self-contained Python scripts with uv
Link: http://blog.dusktreader.dev/2025/03/29/self-contained-python-scripts-with-uv/
Discussion: https://news.ycombinator.com/item?id=43519669
If you have a fediverse account, you can quote this note from your own instance. Search https://social.lansky.name/users/hn50/statuses/114249656367574275 on your instance and quote it. (Note that quoting is not supported in Mastodon.)
https://social.lansky.name/@hn50/114249656367574275
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = ["ipython", "httpx", "loguru"]
# ///
import httpx
import IPython
from loguru import logger
...