Analysis tools logo

95 Python Static Analysis Tools

Type:
Any

What is Python?

Python is an interpreted, high-level and general-purpose programming language. Created by Guido van Rossum and first released in 1991, Python's design philosophy emphasizes code readability with its notable use of significant whitespace. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects. Python is dynamically typed and garbage-collected. It supports multiple programming paradigms, including structured…

(More info)

What are the best Python analysis tools?

158
82

mypy

  • Type: cli
14257

A static type checker that aims to combine the benefits of duck typing and static typing, frequently used with [MonkeyType](https://github.com/Instagram/MonkeyType).

69

Semgrep

  • Type: cli
  • Type: service
7445

A fast, open-source, static analysis tool for finding bugs and enforcing code standards at editor, commit, and CI time. Its rules look like the code you already write; no abstract syntax trees or regex wrestling. Supports 17+ languages.

51

flake8

  • Type: cli
2487

A wrapper around `pyflakes`, `pycodestyle` and `mccabe`.

49
48

Sonatype

  • Type: service

Reports known vulnerabilities in common dependencies and recommends updated packages to minimize breaking changes

42

pylint

  • Type: cli
4365

Looks for programming errors, helps enforcing a coding standard and sniffs for some code smells. It additionally includes `pyreverse` (an UML diagram generator) and `symilar` (a similarities checker).

25

ThreatMapper

  • Type: service
  • Type: web
2468

Vulnerability Scanner and Risk Evaluation for containers, serverless and hosts at runtime. ThreatMapper generates runtime BOMs from dependencies and operating system packages, matches against multiple threat feeds, scans for unprotected secrets, and scores issues based on severity and risk-of-exploit.

24

CodeScene

  • Type: service

CodeScene is a quality visualization tool for software. Prioritize technical debt, detect delivery risks, and measure organizational aspects. Fully automated.

20

ShiftLeft

  • Type: service

Identify vulnerabilities that are unique to your code base before they reach production. Leverages the Code Property Graph (CPG) to run its analyses concurrently in a single graph of graphs. Automatically finds business logic flaws in dev like hardcoded secrets and logic bombs

18

bandit

  • Type: cli
4717

A tool to find common security issues in Python code.

18

Coverity

  • Type: cli

Synopsys Coverity supports 20 languages and over 70 frameworks including Ruby on rails, Scala, PHP, Python, JavaScript, TypeScript, Java, Fortran, C, C++, C#, VB.NET.

16

DeepSource

  • Type: service

In-depth static analysis to find issues in verticals of bug risks, security, anti-patterns, performance, documentation and style. Native integrations with GitHub, GitLab and Bitbucket. Less than 5% false positives.

15

jedi

  • Type: cli
5287

Autocompletion/static analysis library for Python.

14

Better Code Hub

  • Type: service

Better Code Hub checks your GitHub codebase against 10 engineering guidelines devised by the authority in software quality, Software Improvement Group.

13

DeepCode

  • Type: service

DeepCode was acquired by Snyk is now Snyk Code.

10

pyright

  • Type: cli
8817

Static type checker for Python, created to address gaps in existing tools like mypy.

10

trunk

  • Type: cli

Modern repositories include many technologies, each with its own set of linters. With 30+ linters and counting, Trunk makes it dead-simple to identify, install, configure, and run the right linters, static analyzers, and formatters for all your repos.

9

wemake-python-styleguide

  • Type: cli
2082

The strictest and most opinionated python linter ever.

7

unimport

  • Type: cli
179

A linter, formatter for finding and removing unused import statements.

6

Codeac

  • Type: service

Automated code review tool integrates with GitHub, Bitbucket and GitLab (even self-hosted). Available for JavaScript, TypeScript, Python, Ruby, Go, PHP, Java, Docker, and more. (open-source free)

6

pycodestyle

  • Type: cli
4726

(Formerly `pep8`) Check Python code against some of the style conventions in PEP 8.

6

pydocstyle

  • Type: cli
976

Check compliance with Python docstring conventions.

5

Scanmycode CE (Community Edition)

  • Type: service
337

Scanmycode - Code Scanning/SAST/Linting using many tools/Scanners with One Report

5

Scanmycode CE (Community Edition)

  • Type: service
337

Scanmycode - Code Scanning/SAST/Linting using many tools/Scanners with One Report

4

pyflakes

  • Type: cli
1213

Check Python source files for errors.

4

Pysa

  • Type: cli
6151

A tool based on Facebook's pyre-check to identify potential security issues in Python code identified with taint analysis.

4

Sider

  • Type: service

An automated code reviewing tool. Improving developers' productivity.

4

Unibeautify

  • Type: cli
  • Type: service
528

Universal code beautifier with a GitHub app. Supports HTML, CSS, JavaScript, TypeScript, JSX, Vue, C++, Go, Objective-C, Java, Python, PHP, GraphQL, Markdown, and more.

3

codeql

  • Type: service
  • Type: ide-plugin

Deep code analysis - semantic queries and dataflow for several languages with VSCode plugin support.

3

Fortify

  • Type: ide-plugin

A commercial static analysis platform that supports the scanning of C/C++, C#, VB.NET, VB6, ABAP/BSP, ActionScript, Apex, ASP.NET, Classic ASP, VB Script, Cobol, ColdFusion, HTML, Java, JS, JSP, MXML/Flex, Objective-C, PHP, PL/SQL, T-SQL, Python (2.6, 2.7), Ruby (1.9.3), Swift, Scala, VB, and XML.

3

vulture

  • Type: cli
2319

Find unused classes, functions and variables in Python code.

2

bellybutton

  • Type: cli
248

A linting engine supporting custom project-specific rules.

2

cpp-linter-action

  • Type: cli
33

A Github Action for linting C/C++ code integrating clang-tidy and clang-format to collect feedback provided in the form of thread comments and/or annotations.

2

Dlint

  • Type: cli
124

A tool for ensuring Python code is secure.

2

Kiuwan

  • Type: service

Identify and remediate cyber threats in a blazingly fast, collaborative environment, with seamless integration in your SDLC. Python, C\C++, Java, C#, PHP and more.

2

ocular

  • Type: service

Enables code auditors and security teams to interactively investigate their unique code bases to find business logic flaws and technical vulnerabilities that traditional SASTs cannot. This is done by enabling the analyst to write their own custom queries. Can find hard-coded secrets, authentication issues, and malicious code like rootkits and backdoors.

2

pytype

  • Type: cli
3999

A static type analyzer for Python code.

2

todocheck

  • Type: cli
395

Linter for integrating annotated TODOs with your issue trackers

2

Codiga

  • Type: service

Automated Code Reviews and Technical Debt management platform that supports 12+ languages.

1

ale

  • Type: ide-plugin
12285

Asynchronous Lint Engine for Vim and NeoVim with support for many languages.

1

ApplicationInspector

  • Type: cli
4012

Creates reports of over 400 rule patterns for feature detection (e.g. the use of cryptography or version control in apps).

1

Atom-Beautify

  • Type: ide-plugin
1505

Beautify HTML, CSS, JavaScript, PHP, Python, Ruby, Java, C, C++, C#, Objective-C, CoffeeScript, TypeScript, Coldfusion, SQL, and more in Atom editor.

1

CodeFlow

  • Type: service

Automated code analysis tool to deal with technical depth. Integrates with Bitbucket and Gitlab. (free for Open Source Projects)

1

imhotep

  • Type: cli
221

Comment on commits coming into your repository and check for syntactic errors and general lint warnings.

1

InspectorTiger

  • Type: cli
77

IT, Inspector Tiger, is a modern python code review tool / framework. It comes with bunch of pre-defined handlers which warns you about improvements and possible bugs. Beside these handlers, you can write your own or use community ones.

1

lizard

  • Type: cli
1476

Lizard is an extensible Cyclomatic Complexity Analyzer for many programming languages including C/C++ (doesn't require all the header files or Java imports). It also does copy-paste detection (code clone detection/code duplicate detection) and many other forms of static code analysis. Counts lines of code without comments, CCN (cyclomatic complexity number), token count of functions, parameter count of functions.

1

mccabe

  • Type: cli
522

Check McCabe complexity.

1

prospector

  • Type: cli
1732

A wrapper around `pylint`, `pep8`, `mccabe` and others.

1

pyre-check

  • Type: cli
6151

A fast, scalable type checker for large Python codebases.

1

pyroma

  • Type: cli
157

Rate how well a Python project complies with the best practices of the Python packaging ecosystem, and list issues that could be improved.

1

wily

  • Type: cli
1022

A command-line tool for archiving, exploring and graphing the complexity of Python source code.

1

xenon

  • Type: cli
217

Monitor code complexity using [`radon`](https://github.com/rubik/radon).

0

Bowler

  • Type: cli
1436

Safe code refactoring for modern Python. Bowler is a refactoring tool for manipulating Python at the syntax tree level. It enables safe, large scale code modifications while guaranteeing that the resulting code compiles and runs. It provides both a simple command line interface and a fluent API in Python for generating complex code modifications in code.

0

CAST Highlight

  • Type: cli

Commercial Static Code Analysis which runs locally, but uploads the results to its cloud for presentation.

0

cohesion

  • Type: cli
174

A tool for measuring Python class cohesion.

0

graudit

  • Type: cli
1167

Grep rough audit - source code auditing tool.

0

include-gardener

  • Type: cli
68

A multi-language static analyzer for C/C++/Obj-C/Python/Ruby to create a graph (in dot or graphml format) which shows all `#include` relations of a given set of files.

0

linty fresh

  • Type: cli
182

Parse lint errors and report them to Github as comments on a pull request.

0

multilint

  • Type: cli
28

A wrapper around `flake8`, `isort` and `modernize`.

0

PyCodeQual

  • Type: service

PyCodeQual gives you insights into complexity and bug risks. It adds automatic reviews to your pull requests.

0

pylama

  • Type: cli
953

Code audit tool for Python and JavaScript. Wraps pycodestyle, pydocstyle, PyFlakes, Mccabe, Pylint, and more

0

radon

  • Type: cli
1390

A Python tool that computes various metrics from the source code.

0

refurb

  • Type: cli
2007

A tool for refurbishing and modernizing Python codebases. Refurb is heavily inspired by clippy, the built-in linter for Rust.

0

relint

  • Type: cli
40

A static file linter that allows you to write custom rules using regular expressions (RegEx).

0

ruff

  • Type: cli
3585

Fast Python linter, written in Rust. 10-100x faster than existing linters. Compatible with Python 3.10. Supports file watcher.

0

Scrutinizer

  • Type: service

A proprietary code quality checker that can be integrated with GitHub.

0

Semgrep Supply Chain

  • Type: service

Quickly find and remediate high-priority security issues. Semgrep Supply Chain prioritizes the 2% of vulnerabilities that are reachable from your code.

0

Sigrid

  • Type: cli
  • Type: service

Sigrid helps you to improve your software by measuring your system's code quality, and then compares the results against a benchmark of thousands of industry systems to give you concrete advice on areas where you can improve.

0

Snyk Code

  • Type: service

Snyk Code finds security vulnerabilities based on AI. Its speed of analysis allow us to analyse your code in real time and deliver results when you hit the save button in your IDE. Supported languages are Java, JavaScript, Python, PHP, C#, Go and TypeScript. Integrations with GitHub, BitBucket and Gitlab. It is free to try and part of the Snyk platform also covering SCA, containers and IaC.

0

SonarCloud

  • Type: service

Multi-language cloud-based static code analysis. History, trends, security hot-spots, pull request analysis and more. Free for open source.

0

SourceMeter

  • Type: cli

Static Code Analysis for C/C++, Java, C#, Python, and RPG III and RPG IV versions (including free-form).

0

Synopsys

  • Type: cli

A commercial static analysis platform that allows for scanning of multiple languages (C/C++, Android, C#, Java, JS, PHP, Python, Node.JS, Ruby, Fortran, and Swift).

0

TencentCodeAnalysis

  • Type: service
  • Type: cli
1322

Tencent Cloud Code Analysis (TCA for short, code-named CodeDog inside the company early) is a comprehensive platform for code analysis and issue tracking. TCA consist of three components, server, web and client. It integrates of a number of self-developed tools, and also supports dynamic integration of code analysis tools in various programming languages.

-1

APPscreener

  • Type: cli

Static code analysis for binary and source code - Java/Scala, PHP, Javascript, C#, PL/SQL, Python, T-SQL, C/C++, ObjectiveC/Swift, Visual Basic 6.0, Ruby, Delphi, ABAP, HTML5 and Solidity.

-1

ciocheck

  • Type: cli
23

Linter, formatter and test suite helper. As a linter, it is a wrapper around `pep8`, `pydocstyle`, `flake8`, and `pylint`.

-1

emerge

  • Type: cli
  • Type: web
386

Emerge is a source code and dependency visualizer that can be used to gather insights about source code structure, metrics, dependencies and complexity of software projects. After scanning the source code of a project it provides you an interactive web interface to explore and analyze your project by using graph structures.

-1

fixit

  • Type: cli
358

A framework for creating lint rules and corresponding auto-fixes for source code.

-1

LGTM

  • Type: service

Find security vulnerabilities, variants, and critical code quality issues using CodeQL queries over source code. Automatic PR code review; free for open source. Formerly semmle. It supports public Git repositories hosted on Bitbucket Cloud, GitHub.com, GitLab.com.

-1

pyanalyze

  • Type: cli
205

A tool for programmatically detecting common mistakes in Python code, such as references to undefined variables and type errors. It can be extended to add additional rules and perform checks specific to particular functions.

-2

Cobra

  • Type: cli

Structural source code analyzer by NASA's Jet Propulsion Laboratory.

-2

DevSkim

  • Type: ide-plugin
759

Regex-based static analysis tool for Visual Studio, VS Code, and Sublime Text - C/C++, C#, PHP, ASP, Python, Ruby, Java, and others.

-2

Understand

  • Type: cli

Code visualization tool that provides code analysis, standards testing, metrics, graphing, dependency analysis and more for Ada, VHDL, and others.

-3

ShiftLeft Scan

  • Type: cli
  • Type: service
548

Scan is a free open-source DevSecOps platform for detecting security issues in source code and dependencies. It supports a broad range of languages and CI/CD pipelines.

-4

Embold

  • Type: service

Intelligent software analytics platform that identifies design issues, code issues, duplication and metrics. Supports Java, C, C++, C#, JavaScript, TypeScript, Python, Go, Kotlin and more.

Deprecated/unmaintained tools

1

pfff

  • Type: cli
190

Facebook's tools for code analysis, visualizations, or style-preserving source transformation for many languages.

1

PyT - Python Taint

  • Type: cli
2109

A static analysis tool for detecting security vulnerabilities in Python web applications.

0

py-find-injection

  • Type: cli
117

Find SQL injection vulnerabilities in Python code.

0

QuantifiedCode

  • Type: service
109

Automated code review & repair. It helps you to keep track of issues and metrics in your software projects, and can be easily extended to support new types of analyses.

❤️ Sponsor this project

We are currently looking for partners who want to sponsor hosting and development of the project.

Check out our Github Sponsors page here

Missing an entry? Please let us know.