blog/2025/03/29/self-contained-python-scripts-with-uv/ #1
Replies: 8 comments 8 replies
-
Test comment. |
Beta Was this translation helpful? Give feedback.
-
Rad. Quick note for those seeing the inline script metadata syntax (PEP 723) at the top of the file; this is from from a very cool addition to the python language |
Beta Was this translation helpful? Give feedback.
-
This is a great feature. The only downside I see is I don't get linting/autocomplete properly for the environment, since the venv is not created/resolved before execution. |
Beta Was this translation helpful? Give feedback.
-
I've tried this before! The idea is beautiful but it has one fatal (in some situations) drawback: it depends on coreutils env. The busybox env that you get in Alpine by default doesn't support the -S flag. One workaround is to install GNU coreutils in your container, or to install uutils-coreutils for a permissively-licensed implementation in rust. |
Beta Was this translation helpful? Give feedback.
-
vote for supporting this in vscode here: microsoft/vscode-python#24916 |
Beta Was this translation helpful? Give feedback.
-
IPython dev here, you csn use |
Beta Was this translation helpful? Give feedback.
-
I've tested your indications. It works nicely! |
Beta Was this translation helpful? Give feedback.
-
Again, I just don't understand why so many people think this is a uv feature (I've seen similar posts on X). Like other people mentioned, this is PEP 723 and many tools have implemented it, including uv, PDM, and more |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
blog/2025/03/29/self-contained-python-scripts-with-uv/
https://dusktreader.github.io/blog/2025/03/29/self-contained-python-scripts-with-uv/
Beta Was this translation helpful? Give feedback.
All reactions