logoalt Hacker News

Terrettalast Thursday at 11:24 PM3 repliesview on HN

uv, yes*, but really PEP 723:

https://peps.python.org/pep-0723/

* disclosure: We are a commercial client of astral.sh


Replies

the__alchemistyesterday at 2:28 PM

This is cool! I ended up also inventing my own syntax to place at the top of one-off scripts to specify deps. (For single-file Python scripts, vs one with a full project dir that has pyproject.toml) I will adopt this instead.

shuraneyesterday at 5:47 PM

Sounds a lot like vim/emacs modelines. This is neat for standalone scripts.

notpushkinyesterday at 4:05 AM

It’ll probably be a game changer for scripts, yes. Writing “portable” Python scripts was a nice exercise, though (and will be, for a while).