tree-sitter-types


Nametree-sitter-types JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/joranhonig/python-tree-sitter-types
SummaryGenerate typed Python bindings for tree-sitter parsers
upload_time2022-12-13 14:47:28
maintainer
docs_urlNone
authorJoran Honig
requires_python
license
keywords
VCS
bugtrack_url
requirements click tree_sitter inflection astor GitPython pydantic black toolz
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 🔧 python-tree-sitter-types

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


## Installation
Installation is simple with pip:
```bash
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:
```bash
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.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/joranhonig/python-tree-sitter-types",
    "name": "tree-sitter-types",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Joran Honig",
    "author_email": "joran.honig@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f9/5a/cffdaed8a928b029af54bd345134fddf74aa3bc6f943b904fdda0bbee228/tree-sitter-types-0.0.1.tar.gz",
    "platform": null,
    "description": "# \ud83d\udd27 python-tree-sitter-types\n\nThis repository contains a python typed interface generation tool for tree-sitter grammars.\n\n\n## Installation\nInstallation is simple with pip:\n```bash\npip install tree-sitter-types\n```\n\n## Usage\nThis library provides two functions.\n\nAs a CLI you can use it to generate the types for your tree-sitter grammar:\n```bash\npython-tree-sitter-types node-types.json your_language_types.py\n```\n\nYou can then package these and distribute them on pypi, following tree-sitters naming standard `tree-sitter-yourlang`.\n\nAs a library it provides the functions to install tree-sitter parsers and to load them into python.\n\n\n## Why is this useful?\n\nTree-sitter is a great library for parsing source code. It is fast, easy to use and has a lot of great features. \nHowever, 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.\n\nWith this library you'll be able to use pythons types for your advantage, leveraging autocompletion for fast coding,\ntypes for correctness, and nice features like matching.\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Generate typed Python bindings for tree-sitter parsers",
    "version": "0.0.1",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "33485729db4bf2e4b8f269b782936412",
                "sha256": "8754599ec71eff8d57ac1db8d890af780d0b142cc8916337223b75a321eeaddb"
            },
            "downloads": -1,
            "filename": "tree-sitter-types-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "33485729db4bf2e4b8f269b782936412",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5889,
            "upload_time": "2022-12-13T14:47:28",
            "upload_time_iso_8601": "2022-12-13T14:47:28.566776Z",
            "url": "https://files.pythonhosted.org/packages/f9/5a/cffdaed8a928b029af54bd345134fddf74aa3bc6f943b904fdda0bbee228/tree-sitter-types-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-13 14:47:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "joranhonig",
    "github_project": "python-tree-sitter-types",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "click",
            "specs": []
        },
        {
            "name": "tree_sitter",
            "specs": []
        },
        {
            "name": "inflection",
            "specs": []
        },
        {
            "name": "astor",
            "specs": []
        },
        {
            "name": "GitPython",
            "specs": []
        },
        {
            "name": "pydantic",
            "specs": []
        },
        {
            "name": "black",
            "specs": []
        },
        {
            "name": "toolz",
            "specs": []
        }
    ],
    "lcname": "tree-sitter-types"
}
        
Elapsed time: 0.07570s