Comparison
black vs hacking vs ruff vs yapf
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
The uncompromising code formatter.
Actively maintained. Last release 7 weeks ago, commits in 23 of the last 26 weeks. A safe choice.
pip install blackOpenStack Hacking Guideline Enforcement
Maintained. Last release 6 months ago. Weaker on release cadence.
pip install hackingAn extremely fast Python linter and code formatter, written in Rust.
Actively maintained. Last release 12 days ago, commits in 26 of the last 26 weeks. A safe choice.
pip install ruffA formatter for Python code
Low maintenance activity. Last release over 2 years ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install yapfIn short
- ruff is the most used: 439.4M downloads a month, 4.0× more than black.
- Maintenance is comparable: black 95, ruff 86, hacking 64, yapf 21 on Pythie’s Index.
- hacking is growing fastest: downloads +64% over the last month.
- Safe default for a new project: ruff.