Python Code Analysis

Open-source Python projects categorized as Code Analysis

Top 23 Python Code Analysis Projects

  • black

    The uncompromising Python code formatter

    Project mention: Uv: Python Packaging in Rust | | 2024-02-15

    black @ git+

  • YouCompleteMe

    A code-completion engine for Vim

    Project mention: How to configure vim like an IDE | /r/vim | 2023-06-27

    For vim specifically, I've been using coc.nvim, which works pretty well for my needs, and I know its quite popular. Another fairly popular one is YouCompleteMe, which I had taken a look at for some other languages; but ended up just using coc as I can't justify using YCM once a year (if that) -- too much "headache" for not a lot of use, you know?

  • WorkOS

    The modern API for authentication & user identity. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • yapf

    A formatter for Python files

    Project mention: Why is Prettier rock solid? | | 2024-02-19

    I think I agree about the testing and labor of complicated translation rules.

    But it doesn't appear that almost every pretty printer uses the Wadler pretty printing paper. It seems like MOST of them don't?

    e.g. clang-format is one of the biggest and best, and it has a model that includes "unwrapped lines", a "layouter", a line break cost function, exhaustive search with memoization, and Dijikstra's algorithm:

    The YAPF Python formatter is based on this same algorithm -

    The Dart formatter used a model of "chunks, rules, and spans"

    It almost seems like there are 2 camps -- the functional algorithms for functional/expression-based languages, and other algorithms for more statement-based languages.

    Though I guess Prettier/JavaScript falls on the functional side.

    I just ran across this survey on and it seems to cover the functional pretty printing languages influenced by Wadler, but functional style, but not the other kind of formatter ("Google" formatters perhaps)

  • isort

    A Python utility / library to sort imports.

    Project mention: A Tale of Two Kitchens - Hypermodernizing Your Python Code Base | | 2023-11-12

    isort will sort the imports for you

  • pytype

    A static type analyzer for Python code

    Project mention: A Tale of Two Kitchens - Hypermodernizing Your Python Code Base | | 2023-11-12

    Pyre from Meta, pyright from Microsoft and PyType from Google provide additional assistance. They can 'infer' types based on code flow and existing types within the code.

  • typeshed

    Collection of library stubs for Python, with static types

    Project mention: What's the point of using `Any` in Union, such as `str | Any` | /r/learnpython | 2023-08-17

    "csv.pyi is from VS Code Pylance extension" is misleading. Yes, it's included in the code base of the extension, but it's likely originally from python/typeshed. I diffed csv.pyi in the extension and the repository, and they're exactly the same.

  • vprof

    Visual profiler for Python

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • code2flow

    Pretty good call graphs for dynamic languages

    Project mention: Any good tool to visualize code/calls graph? | /r/learnc | 2023-03-23

    like this is for javascript)

  • coala

    coala provides a unified command-line interface for linting and fixing all your code, regardless of the programming languages you use.

  • vulture

    Find dead Python code

    Project mention: Finding unused function/classes | /r/learnpython | 2023-05-22

    I started to use vulture which works fine for most simple cases, but where I have 2 functions with same name in different context(one is class method, second is normal function) and only one is used then tool cannot find such situation.

  • wemake-python-styleguide

    The strictest and most opinionated python linter ever!

  • ycmd

    A code-completion & code-comprehension server

  • pylance-release

    Documentation and issues for Pylance

    Project mention: Help! Connection to server got closed error | /r/vscode | 2023-12-07
  • pydeps

    Python Module Dependency graphs

  • pyannotate

    Auto-generate PEP-484 annotations

  • git-fame

    :star: Pretty-print `git` repository collaborators sorted by contributions

  • lancer

    Turn your python code into a hideous mess. Ever heard of Black? This is the opposite.

  • tokei-pie

    Render tokei's output to interactive sunburst chart.

  • monitors4codegen

    Code and Data artifact for NeurIPS 2023 paper - "Monitor-Guided Decoding of Code LMs with Static Analysis of Repository Context". `multispy` is a lsp client library in Python intended to be used to build applications around language servers.

    Project mention: Show HN: Multilspy – A library to easily use language servers to analyze code | | 2023-11-28
  • chainjacking

    Find which of your direct GitHub dependencies is susceptible to RepoJacking attacks

  • cookiecutter-cpp-project

    A cookiecutter for a C++ Project with lots of configuration options

  • smart-imports

    smart imports for Python

  • vast

    VisAST: Building and visualising Abstract Syntax Trees for Python code. (by JamesPhillipsUK)

  • Onboard AI

    ChatGPT with full context of any GitHub repo. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2024-02-19.

Python Code Analysis related posts


What are some of the best open-source Code Analysis projects in Python? This list will help you:

Project Stars
1 black 36,798
2 YouCompleteMe 25,177
3 yapf 13,588
4 isort 6,240
5 pytype 4,487
6 typeshed 3,965
7 vprof 3,940
8 code2flow 3,591
9 coala 3,503
10 vulture 2,926
11 wemake-python-styleguide 2,374
12 ycmd 1,670
13 pylance-release 1,638
14 pydeps 1,547
15 pyannotate 1,399
16 git-fame 561
17 lancer 251
18 tokei-pie 158
19 monitors4codegen 78
20 chainjacking 53
21 cookiecutter-cpp-project 47
22 smart-imports 38
23 vast 6
ChatGPT with full context of any GitHub repo.
Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at