Skip to main content

🔧 python-tree-sitter-types

Package Version

This repository contains a python typed interface generation tool for tree-sitter grammars.

Installation

Installation is simple with pip:

pip install tree-sitter-types

Usage

This library provides two functions.

As a CLI you can use it to generate the types for your tree-sitter grammar:

python-tree-sitter-types node-types.json your_language_types.py

You can then package these and distribute them on pypi, following tree-sitters naming standard tree-sitter-yourlang.

As a library it provides the functions to install tree-sitter parsers and to load them into python.

Why is this useful?

Tree-sitter is a great library for parsing source code. It is fast, easy to use and has a lot of great features. However, it is written in C and does not provide a typed interface for python. This makes writing tools on top of it a bit cumbersome.

With this library you'll be able to use pythons types for your advantage, leveraging autocompletion for fast coding, types for correctness, and nice features like matching.

Metadata

Release files for tree-sitter-types 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for tree-sitter-types 0.0.2
File Interpreter ABI Platform Actions
tree_sitter_types-0.0.2-py3-none-any.whl Python 3 none any Details for tree_sitter_types-0.0.2-py3-none-any.whl

Release files / tree_sitter_types-0.0.2-py3-none-any.whl

Download URL tree_sitter_types-0.0.2-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aee9803f34e33ba4c2724c62192519630a2457f37d3c4ca7f127823c8dbc8dd5
BLAKE2b-256 checksum
How to use checksums
7fc7c110977356c3b342f8199c6877ad3d87edcd5dd635e4e575e1dde72b4b49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Security for tree-sitter-types 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page