←back to thread

Fun with uv and PEP 723

(www.cottongeeks.com)
619 points deepakjois | 1 comments | | HN request time: 0.423s | source
Show context
jkingsman ◴[] No.44369910[source]
uv has been fantastic to use for little side projects. Combining uv run with `uv tool run` AKA `uvx` means one can fetch, install within a VM, and execute Python scripts from Github super easily. No git clone, no venv creation + entry + pip install.

And uv is fast — I mean REALLY fast. Fast to the point of suspecting something went wrong and silently errored, when it fact it did just what I wanted but 10x faster than pip.

It (and especially its docs) are a little rough around the edges, but it's bold enough and good enough I'm willing to use it nonetheless.

replies(4): >>44370062 #>>44374562 #>>44375253 #>>44391468 #
TZVdosOWs3kZHus ◴[] No.44374562[source]
No more dependency problems with mkdocs I ran into before every other month:

  uvx --with mkdocs-material --with mkdocs-material-extensions --with mkdocs-nav-weight mkdocs serve -a localhost:1337
Funnily enough it also feels like it is starting faster.
replies(1): >>44376310 #
winterqt ◴[] No.44376310[source]
Is there a reason you didn’t explicitly pull in mkdocs as a dependency in that invocation? I guess uv will expose it/let you run it anyways due to the fact that it’s required by everything else you did specify.
replies(1): >>44377548 #
1. tfitz237 ◴[] No.44377548[source]
its a `uvx` call, so the tool being invoked is `mkdocs`, and all the other dependencies are additions on top of that