Code Quality & Packaging

ruff

A code checker so fast it finishes before you'd notice it started, because it isn't written in Python at all.

Install it: pip install ruff

What does it do?

Ruff scans Python code for errors, style problems, and bad practices, the way a spell-checker scans a document for mistakes, except it can also automatically fix many of the issues it finds. What makes it noteworthy is speed: it’s written in Rust, a lower-level programming language built for performance, so it can check codebases in a fraction of the time older Python-based tools take. It replaces what used to require several separate tools, a linter, an import sorter, sometimes a formatter, with one unified program. Teams that switch often describe the speed difference as immediately, viscerally noticeable.

See it in action

These are terminal commands that scan every Python file in the current folder for problems, automatically fix what it safely can, and reformat the code.

ruff check .
ruff check --fix .
ruff format .

Why would a non-developer care?

Waiting on tools is dead time multiplied across every developer, every save, every day. A checker that runs in milliseconds instead of seconds adds up to real hours given back to actual thinking and building rather than staring at a spinner.

Real-world examples

Ruff is made by Astral, a company founded specifically around fast Python developer tooling, and it has been adopted by major projects like FastAPI and Pandas as a replacement for slower, older linting setups. Teams migrating from older linting tools onto Ruff commonly report their code-checking step going from tens of seconds to a near-instant blip.

Who uses it

Python teams and open-source projects that outgrew the speed of older linting tools and want one fast tool instead of several slow ones.

How it compares to alternatives

It directly replaces the combination of Flake8, isort, and parts of what pylint does, and increasingly competes with Black on formatting too, all while running dramatically faster than any of them individually.

Fun fact

Ruff’s maker, Astral, later went on to build the also extremely fast uv Python package installer using the same speed-first philosophy.

New to Python and want to actually try libraries like this yourself?

Find a beginner-friendly course

Related libraries