←back to thread

Fun with uv and PEP 723

(www.cottongeeks.com)
619 points deepakjois | 2 comments | | HN request time: 0.429s | source
Show context
kristianp ◴[] No.44370875[source]
Does this create a separate environment for each script? If so, won't that create lots of bloat?
replies(3): >>44370932 #>>44371915 #>>44379571 #
JimDabell ◴[] No.44370932[source]
Yes, it creates a separate environment for each script. No, it doesn’t create a lot of bloat. There’s a separate cache and the packages are hard-linked into the environments, so it’s extremely fast and efficient.
replies(1): >>44372678 #
1. kristianp ◴[] No.44372678[source]
Is the environment located in the .venv folder under the same directory as the script?
replies(1): >>44373801 #
2. knowaveragejoe ◴[] No.44373801[source]
The venv is created and then discarded once the script finishes execution. This is well suited to one-off scripts like what is demonstrated in the article.

In a larger project you can manage venvs like this using `uv venv`, where you end up with a familiar .venv folder.