astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
19.93k stars 591 forks source link

Support `--with-requirements script.py` to include inline dependency metadata from another script #6542

Open zanieb opened 3 weeks ago

zanieb commented 3 weeks ago

I'm not sure we should support this, but to track the idea...

uvx --with-requirements script.py <tool> script.py would be a cool way to give access to the requirements of a script.

zanieb commented 3 weeks ago

Basically this is an alternative for calling the script with something other than python.

Maybe it's just

uv run --script-runner <foo> script.py