Using the UV hashbang and a few doc strings for dependencies so you can run full on python scripts as executables is fucking crack.
I have an idea of what this might look like, but do you have any examples I can crib from?
This article looks like it explains the process:
https://mathspp.com/blog/til/standalone-executable-python-scripts-with-uv
Cool. But for God’s sake don’t run python code from the internet, that’s such a huge security risk,
Thank you, this goes to the top of my reading pile for tomorrow! We’ve been doing a lot of uv conversions at work and I have a specific personal use for this as well
And it isn’t even written in Python!
spoiler alert: Python isn’t written in Python
Literally it’s best feature, because then you can download a binary and guarantee that with that binary, you have a working python virtualenv on every platform UV supports.
This page said it’s written in Rust. Is this the same UV?
yes
Does it allow differentiating between dependencies and dev dependencies though? I couldn’t gather that from the article.
it does, I use it every day
this is the standard https://packaging.python.org/en/latest/specifications/dependency-groups/
UV has a shitload of features. I’ve only ever really used it for making virtualemvs for easier cross platform compatibility, but even just for that, there’s tons of options related to which packages, from where, etc.
tl:dr probably, although differentiating between “deploy” and “dev” installs is the task of the package config which UV doesn’t (to my knowledge) replace in any way.






