Registry / type-stubs / types-tree-sitter-languages

types-tree-sitter-languages

JSON →
library1.10.0.20250530pypypiunverified

PEP 561 stub-only package providing type annotations for tree-sitter-languages, enabling type-checking of grammar definitions and language bindings. As of version 1.10.0.20250530, it supports Python >=3.9 and is maintained by the typeshed project. Releases track tree-sitter-languages versions with a date suffix for stub updates.

pip install types-tree-sitter-languages
INSTALL
IMPORT
SIG · TYPES-TREE-SITTER-
T
types-tree-sitter-languages
type-stubspythonv1.10.0.20250530
Install
1.6s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.10.0.20250530 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Language
from tree_sitter_languages_stubs import Language
from tree_sitter_languages_stubs import Language

Demonstrates basic usage: obtaining a language object and parser for Python, parsing a snippet, and accessing the syntax tree.

from tree_sitter_languages import get_language, get_parser language = get_language('python') parser = get_parser('python') tree = parser.parse(bytes('print(1)', 'utf8')) print(tree.root_node.child(0).type) # expression_statement
Debug
Known issues
gotchaStub package only provides type hints; you must install tree-sitter-languages separately for runtime use.
fix
pip install tree-sitter-languages
affects: all
deprecatedThe 'Language' class import path was deprecated in favor of direct use according to typeshed updates; the correct way is to use get_language and get_parser functions.
fix
Use 'from tree_sitter_languages import get_language, get_parser' instead.
affects: >=1.10.0
Upgrade
Version history
1.10.0.20250530latest on PyPI · released May 30, 2025
Audit
Dependencies
tree-sitter-languagesrequiredRuntime package for which stubs are provided.
Agent activity
52 hits · last 30 days
node
46
OpenAI (training)
1
Resources
types-tree-sitter-languages — pip install types-tree-sitter-languages · libregistry