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.11.0.tar.gz (49.1 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.11.0-cp310-abi3-win_amd64.whl (16.2 MB view details)

Uploaded CPython 3.10+Windows x86-64

tree_sitter_language_pack-0.11.0-cp310-abi3-macosx_10_15_universal2.whl (31.5 MB view details)

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

File details

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

File metadata

File hashes

Hashes for tree_sitter_language_pack-0.11.0.tar.gz
Algorithm Hash digest
SHA256 228901ce64c2b08feabfeeb687d6eb9450825bb8bd8cdf9caffffb9e7939614a
MD5 617a1410c070bfa31ad07c39d92d05e9
BLAKE2b-256 4020b21748c3386effa68bc7ab6d2bd9b78eabe391adc5797b7d37b24930f3b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_language_pack-0.11.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.11.0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_language_pack-0.11.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5cab767ba535c8bb09ac4c2db4b672f0ff67135083355f50713e7052fa37e6ef
MD5 e50a86729b19af795e73a86c7052e6e1
BLAKE2b-256 82bb17ee0bafb1b9e24075fe528b7f8963c6855dac56ccead44bf7855af3fab8

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_language_pack-0.11.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.11.0-cp310-abi3-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_language_pack-0.11.0-cp310-abi3-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d029f9dc282f66a25d35b13d23ff2cd7108cd0170b426e0c1f755892d022e68c
MD5 4e69b04d7f6b4a5793140a946a56aaac
BLAKE2b-256 f09fae964c062274507225e5f35262919c8d2f186eaec4ea76d1b67ba9c2f696

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_language_pack-0.11.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.11.0-cp310-abi3-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_language_pack-0.11.0-cp310-abi3-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b4205958666c597d8a1b74eb4c845764c3aebd5db3c2484c2a5d9701b3feef42
MD5 959316b8c7fc7ea5b8e4bfafd4fd6ede
BLAKE2b-256 67d9c8335131075f84cbac955f521b5194655dd7340574b87d3611ed8583ec20

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_language_pack-0.11.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.11.0-cp310-abi3-macosx_10_15_universal2.whl.

File metadata

File hashes

Hashes for tree_sitter_language_pack-0.11.0-cp310-abi3-macosx_10_15_universal2.whl
Algorithm Hash digest
SHA256 58b0351dd43e6a91261ac1264e9794a83c20eb78baa839e42699499ece1667dc
MD5 2816707e6fc2c07a050d5effaa0e76f2
BLAKE2b-256 612c33ec4d1458db4173d49b7f273b62ed7ce2c173eee1d0331ead912d93ee6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_language_pack-0.11.0-cp310-abi3-macosx_10_15_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