Python linter libraries

Updated Nov 2026

Python linter libraries read source code without running it and report errors, style violations, and suspicious patterns. A linter parses each file into a syntax tree and checks it against a set of rules. These libraries let developers and AI coding agents catch mistakes before code review.

Popularity

Ruff has the most monthly downloads in this comparison, at 432.1M.

LibraryMonthly downloadsStarsLast releaseLicense
Ruff
432.1M
51.3KNov 2026MIT
pycodestyle
63.2M
5.2KSep 2026MIT
Pyflakes
53.8M
1.5KOct 2026MIT
Flake8
43.3M
3.8KOct 2026MIT
Pylint
40.8M
5.8KNov 2026GPL-2.0-or-later
pydocstyle
4.4M
1.1KJan 2023MIT
Prospector
325.9K
2.1KNov 2026GPL-2.0-or-later
Pylama
98.3K
1.0KAug 2022MIT
Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Features compared

LibraryAutomatic fixesDocstring checksJSON reports
RuffBuilt-inBuilt-inBuilt-in
pycodestyleUnsupportedUnsupportedUnsupported
PyflakesUnsupportedUnsupportedUnsupported
Flake8UnsupportedVia pluginVia plugin
PylintUnsupportedBuilt-inBuilt-in
pydocstyleUnsupportedBuilt-inUnsupported
ProspectorUnsupportedBuilt-inBuilt-in
PylamaUnsupportedBuilt-inBuilt-in
Built-inVia pluginNot supported

Libraries and code examples

Lints Python files and directories with optional automatic fixes.

Downloads / mo
432.1M
Stars
51.3K
Last release
0.17.6
License
MIT

Strengths

  • Applies safe fixes by default. Use check --fix to apply available safe changes.
  • Rechecks files as they change. Use check --watch for continuous directory linting.

Limitations

  • Custom rules need another tool. Choose Flake8 when adding project-specific Python checks.
  • Unsafe fixes can change behavior. Review unsafe changes before enabling --unsafe-fixes.

Quickstart

From linter.md
$ python -m pip install ruff==0.17.6
ruff check .

Checks Python code against a subset of PEP 8 style conventions.

Downloads / mo
63.2M
Stars
5.2K
Last release
2.15.0
License
MIT

Strengths

  • Needs only the standard library. Embed its single Python module for style checking.
  • Accepts custom style checks. Register additional checks through its plugin architecture.

Limitations

  • Style coverage is deliberately partial. Some PEP 8 rules are outside its scope.
  • Leaves automatic fixes to others. Use a separate fixer to change source code.

Quickstart

From advanced.rst
$ python -m pip install pycodestyle==2.15.0
pycodestyle .

pycodestyle examples

From open-source projects on GitHub

Checks Python programs without running them.

Downloads / mo
53.8M
Stars
1.5K
Last release
4.1.0
License
MIT

Quickstart

From api.py
$ python -m pip install pyflakes==4.1.0
pyflakes .

Pyflakes examples

From open-source projects on GitHub

Combines PyFlakes, pycodestyle, and McCabe checks in one per-file warning stream.

Downloads / mo
43.3M
Stars
3.8K
Last release
7.5.0
License
MIT

Strengths

  • Combines error and style checks. Run PyFlakes, pycodestyle, and complexity checks through one command.
  • Loads custom checkers and formatters. Extend diagnostics through extension and formatting entry points.

Limitations

  • Python API has compatibility gaps. The legacy API does not preserve every argument or required type.

Quickstart

From configuration.rst
$ python -m pip install flake8==7.5.0
flake8 .

Flake8 examples

From open-source projects on GitHub

Checks errors, coding conventions, and refactoring opportunities without running the target code.

Downloads / mo
40.8M
Stars
5.8K
Last release
4.1.4
License
GPL-2.0-or-later

Strengths

  • Infers values behind variable names. Finds issues in code that is not fully typed.
  • Captures reports in custom streams. Pass a reporter with an open stream to Run.

Limitations

  • Full checks slow live feedback. Run full checks on save or in CI instead of each keystroke.
  • Third-party support is incomplete. Load a checker plugin for unsupported framework behavior.

Quickstart

From pylint.rst
$ python -m pip install pylint==4.1.4
pylint --recursive=y .

Pylint examples

From open-source projects on GitHub

Checks docstring style.

Downloads / mo
4.4M
Stars
1.1K
Last release
6.3.0
License
MIT

Quickstart

From README.rst
$ python -m pip install pydocstyle==6.3.0
pydocstyle .

pydocstyle examples

From open-source projects on GitHub

Analyzes Python code by combining the results of other tools.

Downloads / mo
325.9K
Stars
2.1K
Last release
1.20.1
License
GPL-2.0-or-later

Quickstart

From usage.rst
$ python -m pip install prospector==1.20.1
prospector .

Prospector examples

From open-source projects on GitHub

Audits Python code.

Downloads / mo
98.3K
Stars
1.0K
Last release
8.4.1
License
MIT

Quickstart

From README.rst
$ python -m pip install pylama==8.4.1
pylama .

Pylama examples

From open-source projects on GitHub

FAQ

Ruff suits most projects, with automatic fixes and rules reimplemented from many other linters. Pylint suits teams that want deeper inference and design checks alongside Ruff. Flake8 suits projects that rely on its plugins.

Ruff is a Python linter and code formatter written in Rust. It reimplements rule families from other linters and fixes many issues automatically. It does not support custom rules written in Python.

Pylint is a static checker that finds errors, convention violations, and refactoring opportunities without running the code. It reports in JSON natively and does not fix code automatically.

Flake8 combines Pyflakes, pycodestyle, and McCabe checks in one command. Plugins add further rules and report formats.

Pylint complements Ruff rather than duplicating its rules. Ruff covers style and correctness checks with automatic fixes. Pylint adds deeper inference and design diagnostics.

For coding agents

Found your linter library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official