←back to thread

741 points chirau | 1 comments | | HN request time: 0.24s | source
Show context
leonheld ◴[] No.44358181[source]
I adore the

  uv add <mydependencies> --script mycoolscript.py
And then shoving

  #!/usr/bin/env -S uv run
on top so I can run Python scripts easily. It's great!
replies(5): >>44358268 #>>44358400 #>>44358419 #>>44358467 #>>44361042 #
kristjansson ◴[] No.44358400[source]
e: I misread your example, disregard below irrelevant pattern matching of 'uv add --script' to 'uv add' in the project context!

~~That mutates the project/env in your cwd. They have a lot in their docs, but I think you’d like run --with or uv’s PEP723 support a lot more~~

https://docs.astral.sh/uv/guides/scripts/

replies(1): >>44358477 #
misnome ◴[] No.44358477[source]
PEP723 support is exactly what the poster is using?
replies(1): >>44358567 #
1. kristjansson ◴[] No.44358567[source]
Ach, missed the --script, thanks.