Skip to main content

Comprehensive collection of 160+ tree-sitter language parsers

Project description

Tree Sitter Language Pack

PyPI Python Versions License Downloads

This package bundles a comprehensive collection of tree-sitter languages as both source distribution and pre-built wheels.

Support This Project

If you find tree-sitter-language-pack useful, please consider sponsoring the development:

Sponsor on GitHub

Your support helps maintain and improve this package for the community! 🚀

Installation

pip install tree-sitter-language-pack

Important Notes

  • This package started life as a maintained and updated fork of tree-sitter-languages by Grant Jenks, and it incorporates code contributed by ObserverOfTime (see this PR).
  • This package is MIT licensed and the original package of which this is a fork has an Apache 2.0 License. Both licenses are available in the LICENSE file.
  • All languages bundled by this package are licensed under permissive open-source licenses (MIT, Apache 2.0 etc.) only - no GPL licensed languages are included.
  • This package follows the general Python life-cycle and now requires Python 3.10 or newer. We align with tree-sitter 0.25.x and newer, which dropped Python 3.9 support ahead of the upstream EOL.

Features

  • 165+ Languages: Support for all major programming languages and many domain-specific languages
  • Pre-built Wheels: Easy installation with no compilation required
  • Type-Safe: Full typing support for better IDE integration and code safety
  • Zero GPL Dependencies: All bundled languages use permissive licenses (MIT, Apache 2.0, etc.)

Usage

This library exposes three functions: get_binding, get_language, and get_parser.

from tree_sitter_language_pack import get_binding, get_language, get_parser

python_binding = get_binding("python")  # this is a pycapsule object pointing to the C binding
python_lang = get_language("python")  # this is an instance of tree_sitter.Language
python_parser = get_parser("python")  # this is an instance of tree_sitter.Parser

See the list of available languages below to get the name of the language you want to use.

Development Setup

To work on the package locally you will need Python 3.10+ and the uv toolchain.

# Install runtime dependencies
uv sync --no-install-project

# Install the tree-sitter CLI used for code generation
npm install -g tree-sitter-cli

# Install prek hooks (Rust-based pre-commit replacement)
uv tool install prek
prek install
prek install --hook-type commit-msg

# Fetch bundled language vendors and build native extensions
uv run --no-sync scripts/clone_vendors.py
PROJECT_ROOT=. uv run setup.py build_ext --inplace

# Run the full test suite
PROJECT_ROOT=. uv run --no-sync pytest tests

# Execute all lint/format checks
prek run --all-files

Available Languages

Each language below is identified by the key used to retrieve it from the get_language and get_parser functions.

Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • Setting up your development environment
  • Adding new languages
  • Running tests
  • Submitting pull requests

License

This project is licensed under the MIT OR Apache-2.0 license. See the LICENSE file for details.

Acknowledgments

This package started as a maintained fork of tree-sitter-languages by Grant Jenks.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tree_sitter_language_pack-0.10.0.tar.gz (49.5 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tree_sitter_language_pack-0.10.0-cp310-abi3-win_amd64.whl (16.2 MB view details)

Uploaded CPython 3.10+Windows x86-64

tree_sitter_language_pack-0.10.0-cp310-abi3-macosx_10_13_universal2.whl (32.0 MB view details)

Uploaded CPython 3.10+macOS 10.13+ universal2 (ARM64, x86-64)

File details

Details for the file tree_sitter_language_pack-0.10.0.tar.gz.

File metadata

File hashes

Hashes for tree_sitter_language_pack-0.10.0.tar.gz
Algorithm Hash digest
SHA256 a1618b29828b64422ed6b2a11187599c5521781348fedd8420f01f6f5039a1fc
MD5 62fd2407d7da05e620399bc1e86380f7
BLAKE2b-256 299497948d2d8a1ebd714f84a79f185f9acf61193210afd72003eb3a109db712

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_language_pack-0.10.0.tar.gz:

Publisher: build_and_publish.yaml on Goldziher/tree-sitter-language-pack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_language_pack-0.10.0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_language_pack-0.10.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 40f70a665d4011393ad2bb206027ed216d3fd01386b25785d5e253a1afff9e3b
MD5 e4a38ae900634ca0de9b994e72088102
BLAKE2b-256 24c6ef0fb0f308f1581ff33c91514714b944c47e4990b10ceac02a5f7340b17e

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_language_pack-0.10.0-cp310-abi3-win_amd64.whl:

Publisher: build_and_publish.yaml on Goldziher/tree-sitter-language-pack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_language_pack-0.10.0-cp310-abi3-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_language_pack-0.10.0-cp310-abi3-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 013b138503b40b0d24294a7652d5bbc998affe506fede45fa2f7d02c9b6b192c
MD5 722ad4da88d193da883cea11b822c0f9
BLAKE2b-256 3462033b2a380a60bcb36462074240d4434883b198bdf24d4d0b21c5df60f0c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_language_pack-0.10.0-cp310-abi3-manylinux2014_x86_64.whl:

Publisher: build_and_publish.yaml on Goldziher/tree-sitter-language-pack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_language_pack-0.10.0-cp310-abi3-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_language_pack-0.10.0-cp310-abi3-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d509cd13728034643b4296b36eb18da3e7f3d41af7ce5a5c433c79e4c84ec848
MD5 68560692d7e3a6a6340c9cc740813e52
BLAKE2b-256 3b8f854a3c397908a2fac74d32b6112e18d417d83ca5ac889440f83b97a08f6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_language_pack-0.10.0-cp310-abi3-manylinux2014_aarch64.whl:

Publisher: build_and_publish.yaml on Goldziher/tree-sitter-language-pack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_language_pack-0.10.0-cp310-abi3-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for tree_sitter_language_pack-0.10.0-cp310-abi3-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a1a15c1dedf95050ba175fbfb4c6feb5e78e2382e12c970757d192ba807f9d41
MD5 19b0e7a6ede0f62f05970847d073b44f
BLAKE2b-256 eb7e0f2b2f02efeb7b09ef180b427a8f157f0e5fe3f1042ed200dafae444de47

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_language_pack-0.10.0-cp310-abi3-macosx_10_13_universal2.whl:

Publisher: build_and_publish.yaml on Goldziher/tree-sitter-language-pack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page