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.
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.
https://pyo3.rs/v0.21.2/getting-started
pipx install maturin # or pip, ...maturin develop
python tests/test.py