astral-sh / uv

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

Add documentation for using interactive tools with `uv run` #6273

Open zanieb opened 3 months ago

zanieb commented 3 months ago

e.g., in a project,

uv run --with ipython ipython

or, with uvx (#6272)

uvx --with . ipython

or, without a project,

❯ uvx --with requests ipython
Installed 21 packages in 53ms
Python 3.12.1 (main, Jan  7 2024, 23:31:12) [Clang 16.0.3 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.26.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: ...
telenieko commented 3 months ago

What about without a project but with inline metadata?

like: https://docs.astral.sh/uv/guides/scripts/#declaring-script-dependencies