tree-sitter/py-tree-sitter
Some data may be outdated — see provenance labels.
Python bindings to the Tree-sitter parsing library observed · 2026-10-01
Health v2 · maintenance only
86/100
- Activity 92
- Release rhythm 71
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 84
- age_days: 2771
- days_rel: 112
- days_push: 51
- n_releases_24m: 6
Adoption not part of the score
1508 stars · 199 forks observed · 2026-10-01
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-10-01 · 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 | 86 |
For agents
markdown · JSON · MCP: product_card(name="tree-sitter/py-tree-sitter")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem