Skip to main content

Python tools, libraries and resources about AST (as in Abstract Syntax Trees)

103
GitHub Stars
33
Curated Resources
8
Categories
4 hours ago
Last Refreshed
Online resourcesToolsUnused code detectionFormattersLintersImport sortersOtherOnline tools

Use this list with your AI agent

Add the Context Awesome MCP server to Claude, Cursor, or any MCP client, then ask:

"Show me online resources resources from awesome-python-ast"

Installation instructions →

What's inside

Other

  • add-trailing-comma

    A tool (and pre-commit hook) to automatically add trailing commas to calls and literals.

  • pyupgrade

    A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language.

  • yesqa

    A tool (and pre-commit hook) to automatically remove unnecessary # noqa comments

Tools

  • astmonkey

    Set of tools to play with Python AST

  • astor

    AST read/write

  • astpath

    A command-line search utility for Python ASTs using XPath syntax.

  • astpretty

    Pretty print the output of python stdlib

  • astroid

    A common base representation of python source code for pylint and other projects

  • astsearch

    Search through ASTs using XPath syntax

Formatters

  • autopep8

    A tool that automatically formats Python code to conform to the PEP 8 style guide

  • black

    Online demo

  • yapf

    Online demo

Unused code detection

Linters

  • flake8

    glues together pycodestyle, pyflakes, mccabe, and third-party plugins to check the style and quality of code

  • mccabe

    McCabe complexity checker

  • pycodestyle

    former

  • pydocstyle

    docstring style checker

  • pyflakes

    A simple program which checks Python source files for errors.

  • pylint

    code analysis tool which looks for programming errors, helps enforcing a coding standard, sniffs for code smells and offers simple refactoring suggestions.

Import sorters

Showing a sample of 33 resources. View the full list on GitHub →