33 points · by BiteCode_dev · 1y ago · 30 comments
No? Well, you can:
uv run https://pastebin.com/raw/RrEWSA5F
And since yesterday, you can even run a github gist:
uv run https://gist.github.com/charliermarsh/ea9eab7f56b1b3d41e5196...
> print("hi")' | uv run -
> curl https://pastebin.com/raw/RrEWSA5F | uv run -
https://gist.github.com/charliermarsh/ea9eab7f56b1b3d41e5196...
devbox on MacOS.
distrobox/toolbx on Linux.
Project Bluefin has some really good ideas and concepts about all this: https://docs.projectbluefin.io/bluefin-dx/
https://docs.astral.sh/uv/guides/scripts/#declaring-script-d...
So not sure it would necessarily be ergonomically worse. It could even be a new run command `uv srun` or something…
Plus inline deps mean you can pin python versions and 3rd party modules using pyproject.toml syntax in a comment of your script. This is not perfect locking, as it doesn't pin sub dependencies, but it's already more that any other tool out there.
If you want perfect locking, create a project, and use uv lock. You are already in a different category of code.
The solution, therefor, as always been to use the OS tooling for that. Even the .Net ecosystem eventually went into that direction.
The JS ecosystem is making that mistake right now, and will of course, deprecate this API in 10 years after they realize they can't make it secure either unless they basically reimplement BSD jails entirely.