Pre-compiled tree-sitter parsers for 197 programming languages with a unified process() API for parsing, analysis, and intelligent code chunking.
Project description
tree-sitter-language-pack — Python
Python bindings for tree-sitter-language-pack, providing access to 170+ pre-compiled tree-sitter parsers with on-demand downloads.
Installation
pip install tree-sitter-language-pack
uv add tree-sitter-language-pack
Quick Start
from tree_sitter_language_pack import init, download, get_language, get_parser, available_languages
# Optional: Pre-download specific languages for offline use
init(["python", "javascript", "rust"])
# Get a language (auto-downloads if not cached)
language = get_language("python")
# Get a pre-configured parser (auto-downloads if needed)
parser = get_parser("python")
tree = parser.parse(b"def hello(): pass")
print(tree.root_node.sexp())
# List all available languages
for lang in available_languages():
print(lang)
from tree_sitter_language_pack import process, ProcessConfig
# Extract file intelligence (auto-downloads language if needed)
result = process("def hello(): pass", ProcessConfig(language="python"))
print(f"Functions: {len(result['structure'])}")
# Pre-download languages for offline use
download(["python", "javascript"])
# With chunking
result = process(source, ProcessConfig(language="python", chunk_max_size=1000, comments=True))
print(f"Chunks: {len(result['chunks'])}")
API Reference
Language Discovery
available_languages()-- list all supported language nameshas_language(name)-- check if a language is availablelanguage_count()-- total number of supported languages
Parsing
get_parser(name)/parse_string(source, language)-- parse source code into a syntax tree
Download API
init(languages)-- pre-download specific languages for offline usedownload(languages)-- download parsers on demand
Intelligence
process(source, config)-- extract structured analysis (functions, classes, imports, comments, chunks) from source code
For detailed API documentation, see the Python package.
License
MIT -- see LICENSE for details.
Part of tree-sitter-language-pack -- A comprehensive collection of tree-sitter language parsers with polyglot bindings.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tree_sitter_language_pack-1.1.0-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: tree_sitter_language_pack-1.1.0-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3517382999313ecb31bc3230d512a745e06c157295f832640d06574991031cb
|
|
| MD5 |
a3965cf7fc6b523ab0642947177ce996
|
|
| BLAKE2b-256 |
a8cc1f39f974cc30b37cb4cf3b1853fc20a5c38eedf1366da75f8417e9e840d1
|
Provenance
The following attestation bundles were made for tree_sitter_language_pack-1.1.0-cp310-abi3-win_amd64.whl:
Publisher:
publish.yaml on kreuzberg-dev/tree-sitter-language-pack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tree_sitter_language_pack-1.1.0-cp310-abi3-win_amd64.whl -
Subject digest:
a3517382999313ecb31bc3230d512a745e06c157295f832640d06574991031cb - Sigstore transparency entry: 1160419276
- Sigstore integration time:
-
Permalink:
kreuzberg-dev/tree-sitter-language-pack@70239251ccd087f8c62d8d93643b16b0c66bccda -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/kreuzberg-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@70239251ccd087f8c62d8d93643b16b0c66bccda -
Trigger Event:
release
-
Statement type:
File details
Details for the file tree_sitter_language_pack-1.1.0-cp310-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: tree_sitter_language_pack-1.1.0-cp310-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 2.3 MB
- Tags: CPython 3.10+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3591f6bb4c9679f58c19a33e47738272ff1e08979dd525a0ffad8256ee22b408
|
|
| MD5 |
0eac1d5f58b3f8ca59b6c8b85d6fd600
|
|
| BLAKE2b-256 |
4387641f1954cf18df63f3bb5d56ca217f4937564e20194f0e17cd4a372b7d45
|
Provenance
The following attestation bundles were made for tree_sitter_language_pack-1.1.0-cp310-abi3-manylinux_2_34_x86_64.whl:
Publisher:
publish.yaml on kreuzberg-dev/tree-sitter-language-pack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tree_sitter_language_pack-1.1.0-cp310-abi3-manylinux_2_34_x86_64.whl -
Subject digest:
3591f6bb4c9679f58c19a33e47738272ff1e08979dd525a0ffad8256ee22b408 - Sigstore transparency entry: 1160419363
- Sigstore integration time:
-
Permalink:
kreuzberg-dev/tree-sitter-language-pack@70239251ccd087f8c62d8d93643b16b0c66bccda -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/kreuzberg-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@70239251ccd087f8c62d8d93643b16b0c66bccda -
Trigger Event:
release
-
Statement type:
File details
Details for the file tree_sitter_language_pack-1.1.0-cp310-abi3-manylinux_2_34_aarch64.whl.
File metadata
- Download URL: tree_sitter_language_pack-1.1.0-cp310-abi3-manylinux_2_34_aarch64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.10+, manylinux: glibc 2.34+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
271b5f7fa96b907398f7c27ca0994315bd8ae4851e8ff08c7df7faf983d775a8
|
|
| MD5 |
ef2e66da46c18c0d7322b071454597af
|
|
| BLAKE2b-256 |
2ea083381aefc35f9b7f1b37103fff08803552ba15ab88d1078812374605c765
|
Provenance
The following attestation bundles were made for tree_sitter_language_pack-1.1.0-cp310-abi3-manylinux_2_34_aarch64.whl:
Publisher:
publish.yaml on kreuzberg-dev/tree-sitter-language-pack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tree_sitter_language_pack-1.1.0-cp310-abi3-manylinux_2_34_aarch64.whl -
Subject digest:
271b5f7fa96b907398f7c27ca0994315bd8ae4851e8ff08c7df7faf983d775a8 - Sigstore transparency entry: 1160419091
- Sigstore integration time:
-
Permalink:
kreuzberg-dev/tree-sitter-language-pack@70239251ccd087f8c62d8d93643b16b0c66bccda -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/kreuzberg-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@70239251ccd087f8c62d8d93643b16b0c66bccda -
Trigger Event:
release
-
Statement type:
File details
Details for the file tree_sitter_language_pack-1.1.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: tree_sitter_language_pack-1.1.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0eb1ee9775f7ecd42291ebec80afe084c242978832af75b6fa36c4345ac3d74f
|
|
| MD5 |
e1a1aa5a72f15ad225a8e6934c1424bd
|
|
| BLAKE2b-256 |
a781fe7e69a1f896a980e6685f7810b282858c6e96be8adfa4e6fd6ec2464698
|
Provenance
The following attestation bundles were made for tree_sitter_language_pack-1.1.0-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
publish.yaml on kreuzberg-dev/tree-sitter-language-pack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tree_sitter_language_pack-1.1.0-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
0eb1ee9775f7ecd42291ebec80afe084c242978832af75b6fa36c4345ac3d74f - Sigstore transparency entry: 1160419186
- Sigstore integration time:
-
Permalink:
kreuzberg-dev/tree-sitter-language-pack@70239251ccd087f8c62d8d93643b16b0c66bccda -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/kreuzberg-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@70239251ccd087f8c62d8d93643b16b0c66bccda -
Trigger Event:
release
-
Statement type: