Skip to content

Learning Notes on uv

Published: at 06:21 AM

uv learning notes

Table of contents

Open Table of contents

features

python versions

installing and managing python:

scripts

executing standalone python scripts, like example.py:

projects

tools

guides

scripts

without dependency:

import sys

print("".join(sys.argv[1:]))
uv run example.py test

# not depend on the project
uv run --no-project example.py

with dependency:

uv run --with rich example.py

creating a python script

uv init --script example.py --python 3.12

declare script dependencies

uv add --script example.py 'requests<3' 'rich'

alternative package indexes

uv add --index "https" --script example.py 'rich'

locking dependency

uv lock --script example.py

Previous Post
Lecture notes on constructive logic 01
Next Post
Introduction to ggml