←back to thread

Fun with uv and PEP 723

(www.cottongeeks.com)
640 points deepakjois | 1 comments | | HN request time: 0.195s | source
Show context
Noumenon72 ◴[] No.44369955[source]
If PEP 723 is only an enhancement proposal does it work only because `uv` happens to support it?

Can you not use `uvx` with your script because it only works on packages that are installed already or on PyPi?

replies(3): >>44370132 #>>44370677 #>>44371058 #
1. deepakjois ◴[] No.44370677[source]
uvx is useful to run scripts inside PyPi packages. It does not support running Python scripts directly

You can use uvx run scripts with a combination of the --with flag to specify the dependencies and invoking python directly. For e.g

uvx --with youtube-transcript-api python transcript.py

But you wont get the benefit of PEP 723 metadata.