I’m living in a uv world

Earlier this year at PyCon 2025 I avoid several talks about python packaging that include talks about this new uv thing. I felt very validated doing so as after talking to others that went to those talks, as they felt the the speakers were very preachy about all the amazing things uv can do. Instead I enjoyed talks about the future of free threading, better exception grouping, and the future of the core of python.

Then I scurried back to my home using black code formatter, setuptools and sometimes even pipenv. As poetry is right out, pyenv has been naughty in My sight, and Anaconda can snuff it1.

So imagine my surprise, now just a few months later, writing this article about to preach to you why you should use uv and Astral’s other tools like ruff and ty.

They’re fast.

Really fast.

There are a few other awesome details as well. So let’s go through those as well. Just remember. These tools are fast!

uv

To start with, the only reason I even tried out uv is because it respects standard Python configurations. All my projects used regular pyproject.toml that were supported directly with pip and setuptools. If I would ever want to switch to poetry (just no) or other options, I would have to completely re-write that file.

Speed test:

Locking

  • poetry lock – 3.86 seconds
  • uv lock – 0.46 seconds

Installing

  • poetry install 27.75 seconds
  • uv sync – 4.04 seconds
  • pip install – 13.02 seconds

uvx

Meh. Not for me.

ruff

Replacing black, flake8, and isort. And doing it faster. And better, in the case of flake8.

ruff format

First, black is awesome, it’s an opinionated code formatter. Which means when you add it to your codebase, everyone will hate something different about how it formats stuff, which means it’s a perfect compromise. ruff format does the same thing. Just a lot faster.

Speed test:

  • black – 2.15 seconds
  • ruff format – 0.05 seconds

ruff check

flake8 is meh. It will tell you when you mess up, but doesn’t help you fix anything. ruff check --fix will find when you messed up, and where it knows what you really meant, will fix it for you!

isort is fine. I think the problem with stuff like that is nothing properly optimizes imports for anything except readability. Which is good, not great. But you can also replace it, and make it faster, with ruff check --select I --fix . Also you don’t have to type this all out all the time, can add it to pyproject.toml.

Speed test:

  • flake8 – 1.13 seconds
  • ruff – 0.08 seconds

ty

A brand new product from the same team, is a new type checker. I honestly haven’t incorporated it into any of my projects yet, as they do claim it’s not stable yet.

Speed test:

  • mypy – 5.96 seconds
  • ty – 0.36 seconds

However, with those speeds, will have to start using it when it’s stable!

The Time Savings

Say we have all these tools as part of our lovely pre-commit checks. In this example case on a small repo on a fast computer, you would go from nine seconds, down to less than half a second. On my slower work laptop with larger repos, this cuts waiting for commits from nearly a minute to under five seconds. A time savings of over ten to one.

  1. https://montypython.fandom.com/wiki/Holy_Hand_Grenade_of_Antioch ↩︎
The owner of this website has made a commitment to accessibility and inclusion, please report any problems that you encounter using the contact form on this website. This site uses the WP ADA Compliance Check plugin to enhance accessibility.