Packages
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
Cython is a source code translator that compiles Python code to C, enabling optional static typing and direct C/C++ interoperability to generate efficient native extensions.
Install it if you need to optimize Python performance, wrap C/C++ libraries, or build fast native extensions.
Annotates Python abstract syntax trees with the positions of tokens and source code text, enabling tools to map AST nodes back to their originating code for refactoring, analysis, and transformation.
Numba is a just-in-time compiler that accelerates numerically-focused Python code by compiling it to machine code via LLVM, with support for NumPy functions, loop parallelization, and GPU code generation.
Python bindings to the tree-sitter parsing library, enabling incremental parsing and syntax tree analysis for source code.
llvmlite provides a lightweight Python binding to LLVM's IR builder, optimizer, and JIT compiler APIs, enabling you to write JIT compilers and code generators without needing the full LLVM C++ API surface.
Parse, simplify, and compare boolean expressions with variables and AND/OR/NOT operators, with support for custom tokenizers and domain-specific languages.
Provides a tree-sitter grammar for parsing Bash shell scripts into an abstract syntax tree, enabling programmatic analysis and manipulation of Bash code.
astor converts Python abstract syntax trees (ASTs) back to readable source code and provides tools for AST manipulation, inspection, and non-recursive tree traversal.
Install it if you need AST round-tripping or advanced tree inspection.
pyelftools parses and analyzes ELF binary files and DWARF debugging information in pure Python, with no external dependencies.
Install it if you need to read or analyze ELF binaries or debug information from Python.
Provides a JavaScript and JSX parser grammar for tree-sitter, enabling incremental parsing and syntax tree analysis of JavaScript code.
Provides Python bindings to Clang's C API, bundled with prebuilt libclang shared libraries for macOS, Windows, and Linux, eliminating the need to install LLVM separately.
Provides a C language grammar for tree-sitter, enabling incremental parsing and syntax tree analysis of C code.
Provides a Java language grammar for tree-sitter, enabling incremental parsing and syntax tree analysis of Java source code.
Provides a C# language parser for tree-sitter, enabling incremental syntax analysis and parsing of C# code from versions 1 through 13.0.
Install it if you're building tools that parse or analyze C# code and want fast, dependency-light syntax tree generation.
Provides a Rust language grammar for tree-sitter, enabling incremental parsing and syntax tree analysis of Rust code.
Provides a Go language grammar for tree-sitter, enabling incremental parsing and syntax tree analysis of Go source code.
Provides a Python grammar for tree-sitter, enabling incremental parsing and syntax tree analysis of Python code.
However, the last release was 337 days ago—verify that the grammar version meets your Python syntax requirements before committing to it in production.
Provides TypeScript and TSX language grammars for tree-sitter, enabling incremental parsing and syntax tree generation for TypeScript and JSX code.
Provides a PHP language grammar for tree-sitter, enabling incremental parsing and syntax tree analysis of PHP code.
Provides a Ruby language grammar for tree-sitter, enabling incremental parsing and abstract syntax tree generation for Ruby code.
A tree-sitter parser grammar for YAML files that enables incremental parsing and syntax tree extraction from YAML 1.2 documents.
Not recommended if you simply need to read or write YAML data—use PyYAML or similar instead.
Provides a C++ language grammar for tree-sitter, enabling incremental parsing and syntax tree generation for C++ code.
Parsy is a parser combinator library that lets you build complex text parsers by combining small, reusable parser functions together in a declarative style.
Install it if you need to parse structured text and prefer a functional, composable approach over regex or hand-rolled parsing logic.
cuTile Python is a compiler and programming language for writing GPU kernels that run on NVIDIA GPUs, allowing you to write parallel tile-based computations in Python that execute on the GPU.
Provides a JSON grammar parser for tree-sitter, enabling incremental parsing and syntax tree analysis of JSON documents.
Provides a tree-sitter parser for embedded template languages like ERB and EJS, enabling syntactic analysis of code embedded within text using `<%` and `%>` delimiters.
Compiles Sass and SCSS stylesheets to CSS through a Python binding of the C/C++ LibSass library, with no Ruby or Node.js dependency.
Not recommended if you expect active maintenance or frequent updates.
Provides a Kotlin language grammar for tree-sitter, enabling incremental parsing and syntax tree analysis of Kotlin code.
However, maintenance is dormant (last release 582 days ago), so verify that the grammar covers your Kotlin version and feature set before committing to a production…
Provides an HTML grammar for tree-sitter, enabling incremental parsing and syntax tree analysis of HTML documents.
Provides a tree-sitter parser grammar for TOML files, enabling incremental parsing and syntax tree analysis of TOML configuration documents.
Install only if you already use or plan to use tree-sitter's Python API; this package alone does not parse TOML.
PyTensor is a Python library for defining, optimizing, and evaluating symbolic mathematical expressions on multi-dimensional arrays, with automatic differentiation and compilation to C, JAX, or Numba.
Install it if you're doing probabilistic programming, building custom optimized numerical pipelines, or need fine-grained control over computation graphs.
Provides a tree-sitter parser grammar for XML and DTD files, enabling incremental parsing and syntax tree analysis of XML documents.
Install only if you already use or plan to use tree-sitter's Python bindings.
Provides a tree-sitter SQL grammar for parsing SQL code into an abstract syntax tree, enabling programmatic analysis and manipulation of SQL statements.
Provides a tree-sitter grammar for parsing Markdown documents, enabling syntactic analysis of Markdown text according to CommonMark with optional extensions like GitHub flavored markdown, task lists, and tables.
However, do not use it where Markdown correctness is critical—the authors acknowledge known inaccuracies.
Arpeggio is a recursive descent parser with memoization that implements PEG (Packrat) grammars, letting you define and parse custom languages or structured text formats.
Install it if you need to build a parser for a custom grammar or language; if you want a higher-level interface for language definition, consider textX instead.
Provides a CSS grammar parser for tree-sitter, enabling incremental parsing and syntax tree analysis of CSS code.
Provides a tree-sitter grammar for parsing regular expressions in PCRE2, POSIX, and JavaScript syntaxes, enabling incremental parsing and syntax analysis of regex patterns.
However, it is a specialized grammar module—install it only if you have a specific need for tree-sitter-based regex parsing; it is not a general-purpose regex library.
Provides a tree-sitter grammar for parsing Swift source code, enabling incremental syntax analysis and abstract syntax tree generation.
Embeds the Wasmtime WebAssembly runtime in Python, allowing you to compile, instantiate, and execute WebAssembly modules and components directly from Python code.
Install it if you need to execute WebAssembly from Python; verify the license terms for your use case first.