astral-sh / uv

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

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

Open zanieb opened 2 months ago

zanieb commented 2 months 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 2 months 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