Skip to content

nohehf/stack-graphs-python-bindings

 
 

Repository files navigation

Stack-Graphs Python bindings

Opinionated Python bindings for the tree-sitter-stack-graphs rust library.

It exposes very few, easy to use functions to index files and query references.

This is a proof of concept draft, to test scripting utilities using stack-graphs easily.

It uses pyo3 and maturin to generate the bindings.

Installation & Usage

pip install stack-graphs-python-bindings # or poetry, ...
from stack_graphs_python import index, query_definition, Position

# ...

You can refer to the example in test/test.py for a concrete usage example.

Development

Ressources

https://pyo3.rs/v0.21.2/getting-started

Setup

pipx install maturin # or pip, ...

Testing

maturin develop
python tests/test.py

About

bindings for using tree-sitter-stack-graphs from python

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors