U is for uv - Python A to Z 0 ▲ Juha-Matti Santala 1 hour ago · Tech · hide · 0 comments Python A-Z is a blog series about Python. Each day, I share insights, ideas and examples for different parts of Python development that match with the letter of the day. Blaugust is an annual blogging festival in August where the goal is to write a blog post every day of the month. uv is a Python package and project manager but in my day-to-day use it’s more of a script and improved REPL runner. In Tame your pesky little scripts, I wrote about my methods for dealing with different scripts I run from a command line and for the ones I write in Python, I use uv to make them easy to run with dependencies. For example, the following script saved as soup #!/usr/bin/env -S uv run --quiet --script # /// script # requires-python = ">=3.10" # dependencies = [ # "bs4", # ] # /// from bs4 import BeautifulSoup soup = BeautifulSoup('<ul><li>First</li><li>Second</li></ul>') can be ran with ./soup and uv will take care of installing BeautifulSoup into a virtual environment that it will run this… No comments yet. Log in to reply on the Fediverse. Comments will appear here.