Python Code Analysis

Open-source Python projects categorized as Code Analysis

Top 23 Python Code Analysis Projects

Code Analysis
  1. black

    The uncompromising Python code formatter

    Project mention: Just use this Next.js Eslint Configuration | dev.to | 2025-01-12

    XO. This feels like the Black of Typescript linting. XO has styles for everything and is very opinionated. This can be nice, because it takes a lot of code style decisions off of your plate. But beware it can be cumbersome to implement in the middle of a project because it will require extensive reformatting. In lieu of XO, I found Unicorn opinionated enough and more immediately useful.

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. YouCompleteMe

    A code-completion engine for Vim

  4. yapf

    A formatter for Python files

    Project mention: Enhance Your Project Quality with These Top Python Libraries | dev.to | 2024-03-18

    YAPF (Yet Another Python Formatter): YAPF takes a different approach in that it’s based off of ‘clang-format’, a popular formatter for C++ code. YAPF reformats Python code so that it conforms to the style guide and looks good.

  5. scalene

    Scalene: a high-performance, high-precision CPU, GPU, and memory profiler for Python with AI-powered optimization proposals

    Project mention: LLMs and Code Optimization | news.ycombinator.com | 2025-01-06

    This has been a feature of the Scalene Python profiler (https://github.com/plasma-umass/scalene) for some time (at this point, about 1.5 years) - bring your own API key for OpenAI / Azure / Bedrock, also works with Ollama. Optimizing Python code to use NumPy or other similar native libraries can easily yield multiple order of magnitude improvements in real-world settings. We tried it on several of the success stories of Scalene (before the integration with LLMs); see https://github.com/plasma-umass/scalene/issues/58 - and found that it often automatically yielded the same or better optimizations - see https://github.com/plasma-umass/scalene/issues/554. (Full disclosure: I am one of the principal designers of Scalene.)

  6. isort

    A Python utility / library to sort imports.

    Project mention: Setting up `pre-commit` in a Django project | dev.to | 2024-06-28

    # .pre-commit-config.yaml (28.06.2024) repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-added-large-files - repo: https://github.com/PyCQA/isort rev: 5.13.2 hooks: - id: isort - repo: https://github.com/psf/black rev: 24.4.2 hooks: - id: black - repo: https://github.com/pycqa/flake8 rev: 7.1.0 hooks: - id: flake8 - repo: local hooks: - id: django-check name: Run Django Check entry: python manage.py check language: system pass_filenames: false types: [python]

  7. pytype

    A static type analyzer for Python code

    Project mention: Python Meta Circular Interpreter (2019) | news.ycombinator.com | 2024-12-18

    pytype (https://github.com/google/pytype) is based on symbolic interpretation of python bytecode, but with the data stack storing types rather than values. it works very well and has been running in production within google forever.

    the nice thing about writing a bytecode rather than an AST interpreter is that you can leverage a lot of the work the python compiler does, and work with the resulting simplified code.

  8. typeshed

    Collection of library stubs for Python, with static types

  9. code2flow

    Pretty good call graphs for dynamic languages

    Project mention: code tools | dev.to | 2024-10-05

    Code2flow generates call graphs for dynamic programming language. Code2flow supports Python, JavaScript, Ruby, and PHP.

  10. vprof

    Visual profiler for Python

  11. vulture

    Find dead Python code

    Project mention: This Week In Python | dev.to | 2024-05-10

    vulture – Find dead Python code

  12. coala

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

  13. wemake-python-styleguide

    The strictest and most opinionated python linter ever!

  14. pydeps

    Python Module Dependency graphs

  15. pylance-release

    Documentation and issues for Pylance

    Project mention: Zed: SSH Remoting Is Here | news.ycombinator.com | 2024-10-31

    a very important difference is that MS doesn't let you use some of their quite nice language servers unless you're using VS Code, e.g. Pylance: https://github.com/microsoft/pylance-release/issues/483

    for this reason, the non-MS-built VS Code isn't equivalent to theirs, regardless of the license of the editor itself.

  16. pyannotate

    Auto-generate PEP-484 annotations

  17. git-fame

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

  18. lancer

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

  19. 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: Multilspy: Building a common LSP client handtuned for all Language servers | news.ycombinator.com | 2024-12-16
  20. multilspy

    multispy is a lsp client library in Python intended to be used to build applications around language servers.

    Project mention: Multilspy: Building a common LSP client handtuned for all Language servers | news.ycombinator.com | 2024-12-16
  21. tokei-pie

    Render tokei's output to interactive sunburst chart.

  22. open-repo-wiki

    You don’t need to read the code to understand how to build!

    Project mention: OpenRepoWiki: Automatically generate a wiki page for any given GitHub repository | news.ycombinator.com | 2025-01-09
  23. chainjacking

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

  24. cookiecutter-cpp-project

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

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).

Python Code Analysis discussion

Log in or Post with

Python Code Analysis related posts

Index

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

# Project Stars
1 black 39,446
2 YouCompleteMe 25,522
3 yapf 13,821
4 scalene 12,363
5 isort 6,568
6 pytype 4,809
7 typeshed 4,456
8 code2flow 4,082
9 vprof 3,957
10 vulture 3,632
11 coala 3,555
12 wemake-python-styleguide 2,639
13 pydeps 1,842
14 pylance-release 1,731
15 pyannotate 1,428
16 git-fame 692
17 lancer 257
18 monitors4codegen 234
19 multilspy 191
20 tokei-pie 184
21 open-repo-wiki 153
22 chainjacking 57
23 cookiecutter-cpp-project 54

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com

Did you know that Python is
the 2nd most popular programming language
based on number of references?