1023 B
1023 B
uv
Meta
name: uv
repo: https://github.com/astral-sh/uv
description: An extremely fast Python package and project manager, written in Rust.
Install
curl -LsSf https://astral.sh/uv/install.sh | sh
Update
uv self update
Usage
Python
uv python list
Virtual Environment
uv venv --seed --python 3.12
--seedwill initpip,setuptoolsandwheel
Script
$ echo 'import requests; print(requests.get("https://example.com"))' > example.py
$ uv add --script example.py requests
Updated `example.py`
$ uv run example.py
Reading inline script metadata from: example.py
Installed 5 packages in 12ms
<Response [200]>
Tool
$ uvx pycowsay 'hello world!'
Resolved 1 package in 167ms
Installed 1 package in 9ms
+ pycowsay==0.0.0.2
"""
------------
< hello world! >
------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||