tree-sitter/py-tree-sitter
Python bindings to the Tree-sitter parsing library observed · 2026-08-28
Health v2 · maintenance only
92/100
- Activity 99
- Release rhythm 78
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 67.5
- age_days: 2723
- days_rel: 64
- days_push: 11
- n_releases_24m: 7
Adoption not part of the score
1491 stars · 192 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Python bindings to the Tree-sitter incremental parsing library, exposing Parser, Tree, Node, and Query APIs for building concrete syntax trees from source code. It ships pre-compiled wheels with no library dependencies and supports loading separately installed language grammars.
Use cases
- parse source code into a syntax tree in Python
- build a code linter or analyzer
- extract symbols and structure from code files
- write syntax-aware code search queries
- power syntax highlighting for an editor
- incrementally reparse edited source code
When to choose
- you need fast, error-tolerant parsing of many programming languages from Python
- you want to query code with Tree-sitter's pattern query syntax
- you're building tooling like highlighters, linters, or refactoring tools
When to avoid
- you need a full compiler frontend with semantic analysis or type information
- you only need to parse Python itself and prefer the stdlib ast module
- you need a pure-Python solution without native extensions
Facets
library · maturity active
parser developer-tools parsers programming-languages developer-tools python cross-platform tree-sitter syntax-tree incremental-parsing code-analysis bindings
2 sources
- readme: https://github.com/tree-sitter/py-tree-sitter · fetched 2026-08-28 · 56c030477140
- homepage: https://tree-sitter.github.io/py-tree-sitter/ · fetched 2026-08-29 · 74a745d78649
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| tree-sitter/py-tree-sitter | main | 92 |
For agents
markdown · JSON · MCP: product_card(name="tree-sitter/py-tree-sitter")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem