I have been using uv
since January 1st. In this post, Iβll quickly go through some of my favorite things about uv
.
π Getting uv
It is not
necessary to curl
into your shell to get the uv
executable. π There are releases available.
Using uv
π Python console
uv run python3
πΈοΈ Web server
uv run python -m http.server uv run python -m http.server 8888
π₯Ί Handling dependencies with --with
Letβs say you want requests
with that Python console
uv run --with requests python3
π§° Using tools
uv tool run pastebin-bisque
uv tool run --from mitmproxy mitmweb
If the tool has not been used previously, it will be retrieved automatically and then executed. You can even specify the version to be used.
π Running scripts
uv run --with argparse,datetime,passgen,faker,requests \ python main.py --no-feature 4 lol.txt dundermifflin.com
π Thatβs an example incantation of faux-credential-dump-generator.
π Whatβs next?
Iβll continue using uv
in earnest for the rest of the month at least. It has lived up to the promise of being a stand-in replacement for pip
and friends. I have yet to find something in my workflow that is not supported by uv
. I have not introduced any reliance on βuv
onlyβ ways of doing things.
My decision on how fully to adopt uv
will depend on what path the community follows to an extent. I am rather happy on the road we are on at the moment.
π READ more
- uv under discussion on Mastodon
- UV β I am (somewhat) sold
- uv - The Next Evolution in Python Packages? β this is episode 453 of
Talk Python['Podcast']
with guest Charlie Marsh