Skip to main content

semble-grammars
Prebuilt tree-sitter grammars for Semble

Compiled tree-sitter grammars for Semble.

The package installs a platform-specific grammar archive and extracts individual libraries to a local cache on first use. It does not access the network at runtime.

Installation

pip install semble-grammars

Usage

from semble_grammars import get_parser

parser = get_parser("python")
tree = parser.parse(b"def hello(): pass")

available_languages() lists the bundled languages. The package supports macOS arm64 and x86-64, Linux arm64 and x86-64, and Windows arm64 and x86-64.

Included grammars (77)

The canonical names accepted by get_parser() are:

asciidoc, astro, bash, batch, c, clojure, cmake, cpp, csharp, css, dart, dockerfile, dtd, elixir, embedded_template, erlang, fortran, gitignore, go, gotmpl, graphql, groovy, haskell, hcl, heex, html, ini, java, javascript, jinja2, json, json5, jsonc, jsonnet, julia, just, kdl, kotlin, latex, lua, make, markdown, markdown_inline, nix, objc, ocaml, org, perl, php, php_only, powershell, properties, proto, python, r, racket, rst, ruby, rust, scala, scheme, scss, solidity, sql, starlark, svelte, swift, toml, tsx, typescript, typst, vim, vue, wat, xml, yaml, zig.

py is an alias for python, terraform is an alias for hcl, embeddedtemplate is an alias for embedded_template, and zsh is an alias for bash.

The MIT license above covers semble-grammars' own code. Each bundled grammar is a separate upstream work with its own license; see THIRD_PARTY_NOTICES.md for the full list.

Building from source

Build grammars from the pinned sources in sources.json:

uv run python scripts/build_grammars.py           # current platform
uv run python scripts/build_grammars.py --windows # Windows via mingw-w64
uv run python scripts/build_grammars.py --all     # current, Linux, and Windows

This requires a C compiler, Git, and the tree-sitter CLI (npm install -g tree-sitter-cli@0.26.11). Linux cross-builds also require Docker. Build the available platform archives into wheels with:

uv run python scripts/build_wheels.py

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

semble_grammars-0.1.2-py3-none-win_arm64.whl (10.4 MB view details)

Uploaded Python 3Windows ARM64

semble_grammars-0.1.2-py3-none-win_amd64.whl (11.1 MB view details)

Uploaded Python 3Windows x86-64

semble_grammars-0.1.2-py3-none-macosx_11_0_arm64.whl (7.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

semble_grammars-0.1.2-py3-none-macosx_10_13_x86_64.whl (6.7 MB view details)

Uploaded Python 3macOS 10.13+ x86-64

File details

Details for the file semble_grammars-0.1.2-py3-none-win_arm64.whl.

File metadata

File hashes

Hashes for semble_grammars-0.1.2-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 6bb406d0fc9594b9bfd3cad82fb538748109d6c72066c0e76ea102c64f12c4d9
MD5 e38b5998b6ce330e41ea4a526495a8c8
BLAKE2b-256 042096078011af0d3b0e5b1c1f4b8937ba6f89f7dd5edef71902e9949845e513

See more details on using hashes here.

Provenance

The following attestation bundles were made for semble_grammars-0.1.2-py3-none-win_arm64.whl:

Publisher: release.yaml on MinishLab/semble-grammars

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

File details

Details for the file semble_grammars-0.1.2-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for semble_grammars-0.1.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 078ae79ad15442a2922dae46620f778fa237b191ac06e9c29832f079915d4d39
MD5 09c941ad53721557db05422945b1be7c
BLAKE2b-256 26d03a783d2eda7e4f8f631ae1890cb87bdfaa6cb97efbc74135b66641b89dde

See more details on using hashes here.

Provenance

The following attestation bundles were made for semble_grammars-0.1.2-py3-none-win_amd64.whl:

Publisher: release.yaml on MinishLab/semble-grammars

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

File details

Details for the file semble_grammars-0.1.2-py3-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for semble_grammars-0.1.2-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c040595ca4e117969a349807dce05c1a51dbb368e80de80b005539fd86ef9c07
MD5 89fc27c7d52131e447f6e36c5b2da7cf
BLAKE2b-256 9dd9e93eb269ccd2494cf4b5ac2f201b5badb959800bf21a2ae700d6d7f6418a

See more details on using hashes here.

Provenance

The following attestation bundles were made for semble_grammars-0.1.2-py3-none-manylinux2014_x86_64.whl:

Publisher: release.yaml on MinishLab/semble-grammars

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

File details

Details for the file semble_grammars-0.1.2-py3-none-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for semble_grammars-0.1.2-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f24f63a04e569f2de28aaf39166c8dddd8e296aa0390ac816df6ad1bd814e3bf
MD5 1c227a0c63b43c034f35eef3ec82315a
BLAKE2b-256 32e2bec01f956cd7aa52505a57954f3259febd00092715eac6f0ea1fff6058e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for semble_grammars-0.1.2-py3-none-manylinux2014_aarch64.whl:

Publisher: release.yaml on MinishLab/semble-grammars

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

File details

Details for the file semble_grammars-0.1.2-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for semble_grammars-0.1.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 772e7011ce5e2ff5d9347a2f027a447c713d3f0d62983dd38457f04aa2215c6c
MD5 de95d75c90bfaecbb4b1d9bfcacfb495
BLAKE2b-256 da4285eca6563cf3794a68e6b0fd6c03d3ed39b1466e68fd14e0b25b70084c19

See more details on using hashes here.

Provenance

The following attestation bundles were made for semble_grammars-0.1.2-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yaml on MinishLab/semble-grammars

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

File details

Details for the file semble_grammars-0.1.2-py3-none-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for semble_grammars-0.1.2-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 52fe698f1d2489e6ad3e6462c9322e77796769b203f74a294f801e5a8bd10f19
MD5 f95a2287537b4bd86c050bdad35741ed
BLAKE2b-256 b6bd2c0491654f9ce320faa72e6e047e07b11e696d8d737dad2a68629a294831

See more details on using hashes here.

Provenance

The following attestation bundles were made for semble_grammars-0.1.2-py3-none-macosx_10_13_x86_64.whl:

Publisher: release.yaml on MinishLab/semble-grammars

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 Sentry Error logging StatusPage Status page