{"id":22503,"library":"types-tree-sitter-languages","title":"types-tree-sitter-languages","description":"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.","status":"active","version":"1.10.0.20250530","language":"python","source_language":"en","source_url":"https://github.com/python/typeshed","tags":["type-stubs","tree-sitter","type-hints","typeshed"],"install":[{"cmd":"pip install types-tree-sitter-languages","lang":"bash","label":"Standard install"}],"dependencies":[{"reason":"Runtime package for which stubs are provided.","package":"tree-sitter-languages","optional":false}],"imports":[{"wrong":"from tree_sitter_languages_stubs import Language","symbol":"Language","correct":"from tree_sitter_languages_stubs import Language"}],"quickstart":{"code":"from tree_sitter_languages import get_language, get_parser\n\nlanguage = get_language('python')\nparser = get_parser('python')\ntree = parser.parse(bytes('print(1)', 'utf8'))\nprint(tree.root_node.child(0).type)  # expression_statement","lang":"python","description":"Demonstrates basic usage: obtaining a language object and parser for Python, parsing a snippet, and accessing the syntax tree."},"warnings":[{"fix":"pip install tree-sitter-languages","message":"Stub package only provides type hints; you must install tree-sitter-languages separately for runtime use.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'from tree_sitter_languages import get_language, get_parser' instead.","message":"The '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.","severity":"deprecated","affected_versions":">=1.10.0"}],"env_vars":null,"search_vec":"'1.10.0.20250530':33 '3.9':37 '561':7 'annot':14 'bind':29 'check':23 'date':54 'definit':26 'enabl':20 'grammar':25 'hint':67 'languag':5,19,28,50 'maintain':40 'packag':11 'pep':6 'project':44 'provid':12 'python':36 'releas':45 'sitter':4,18,49,64 'stub':9,57,61 'stub-on':8 'suffix':55 'support':35 'track':46 'tree':3,17,48,63 'tree-sitt':62 'tree-sitter-languag':16,47 'type':2,13,22,60,66 'type-check':21 'type-hint':65 'type-stub':59 'types-tree-sitter-languag':1 'typesh':43,68 'updat':58 'version':32,51","created_at":"2026-04-27T17:05:31.269347+00:00","updated_at":"2026-04-27T17:05:31.269347+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nModuleNotFoundError: No module named 'tree_sitter_languages_stubs'"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.10.0.20250530","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/typeshed-internal/stub_uploader","docs":null,"changelog":"https://github.com/typeshed-internal/stub_uploader/blob/main/data/changelogs/tree-sitter-languages.md","pypi":"https://pypi.org/project/types-tree-sitter-languages/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}