I've been using this for a few weeks now, and it's really handy. But I did learn the hard way that it fails if you don't have internet connection, even if you already have the venv cached.
Zx adds a couple nice ease of use things to node.js, designed to help shell scripting. Among other things, if you call /usr/bin/env zx, it will automatically retrieve any module imports you have in your code! https://github.com/google/zx
I've been using this for a few weeks now, and it's really handy. But I did learn the hard way that it fails if you don't have internet connection, even if you already have the venv cached.
reminds me of nix-shell shebang [0] which enables a similar pattern for scripts of arbitrary languages.
[0]: https://nixos.wiki/wiki/Nix-shell_shebang
this builds upon PEP 723, which is "accepted", so it's likely here to stay.
https://peps.python.org/pep-0723/
I've been very slowly migrating scripts to work with this, and `pipx run`. glad to know uv has also picked it up.
Zx adds a couple nice ease of use things to node.js, designed to help shell scripting. Among other things, if you call /usr/bin/env zx, it will automatically retrieve any module imports you have in your code! https://github.com/google/zx
Curious - how many containers and machines images these days come with uv by default?
Fantastic. I'm very impressed with Simon Willison in general (what a dynamo) and this in particular.
Simon is an impressive individual, but in this instance, you're praising the messenger and not the source.
> Code from this PR [1] by David Laban.
That leverages the features of uv run with embedding script dependencies [2].
[1] https://github.com/alsuren/sixdofone/pull/8 [2] https://docs.astral.sh/uv/concepts/projects/run/#running-scr...