Ruff is an extremely fast Python linter and code formatter written in Rust, replacing Flake8, isort, Black, and more with a single tool, ideal for large projects and CI.
- 0.17.3
- Published at
- 1d ago
- 50,317
- Stars
- 2,103,933
- Download
- Synced at
- 1d ago
Latest release
0.17.3Oct 27, 2026, 12:35 AMDownloads slow? Switch the source anytime above
README
Project Overview
Ruff is a Python linter and code formatter written in Rust, known for its extreme speed of 10-100x over existing tools. It ships 900+ built-in rules and can replace Flake8 plus dozens of plugins, Black, isort, pydocstyle, pyupgrade, and more in one tool. Installable via pip, it supports pyproject.toml natively and is used by major open-source projects such as Airflow, FastAPI, and pandas.
| Item | Value |
|---|---|
| Language | Rust |
| Target code | Python |
| Install | pip, uv, pipx, standalone installer |
| License | MIT |
One tool for Python style and quality, fast enough for commit hooks.
Key Features
- Extremely fast linting: 10-100x faster than Flake8 and other traditional linters
- Code formatting: built-in formatter compatible with Black output
- Import sorting: built-in isort-equivalent sorting
- 900+ rules: native re-implementations of popular plugin rules like flake8-bugbear
- Auto-fixing: fixes issues automatically, such as removing unused imports
- Caching: built-in caching avoids re-analyzing unchanged files
- Flexible configuration: native pyproject.toml support with hierarchical cascading config
- Editor integrations: official plugins for VS Code and more
Target Audience
- Python developers
- Open-source maintainers
- Engineering teams that care about CI lint speed
- monorepo owners
- Teams unifying code style
Quick Start
- Install Ruff
pip install ruff- Lint the current directory
ruff check- Format the current directory
ruff format- Configure rules and behavior in pyproject.toml as needed
Core Advantages
- Blazing speed: full-repository scans often finish in under a second, safe for commit hooks
- All in one: replaces multiple linters and formatters with a single toolchain entry
- Smooth migration: output-compatible with existing tools keeps switching costs low
- monorepo friendly: hierarchical and cascading configuration suits large codebases
System Requirements
| Item | Requirement |
|---|---|
| OS | Linux, macOS, Windows |
| Target language | Python 3.x |
| Runtime | Single executable, no Python runtime needed |
Notes
- Rule selection: enable rules per project needs to avoid alert noise from 900+ options
- Migration path: when moving from Flake8, review the rule mapping first
- Upgrades: new versions may change defaults; check the changelog before upgrading
Release history
Sort