Pick one of the two approaches:
# From the repo root; installs the Python extension in editable mode
pip install pyarrow # or: uv pip install pyarrow
maturin develop -m crates/lance-graph-python/Cargo.toml
# Run examples
python examples/basic_cypher.py
python examples/kg_traversal.pyWith uv (persistent venv recommended):
# Create and activate a reusable environment
uv venv .venv && . .venv/bin/activate
# Install dependencies and build editable extension
uv pip install pyarrow
uvx --from maturin maturin develop -m crates/lance-graph-python/Cargo.toml
# Run examples using the venv's Python
python examples/basic_cypher.py
python examples/kg_traversal.py- From PyPI (when published):
pip install lance-graph pyarrow
python examples/basic_cypher.py
python examples/kg_traversal.py- From git (editable):
pip install -e python
python examples/basic_cypher.py
python examples/kg_traversal.pyuv creates a fresh isolated environment per run. If you prefer a one-liner without installing the package, point PYTHONPATH to the source package and let uv provide pyarrow:
PYTHONPATH=python/python uv run --with pyarrow python examples/basic_cypher.py
PYTHONPATH=python/python uv run --with pyarrow python examples/kg_traversal.pybasic_cypher.py: simple node filter and projection.
python examples/basic_cypher.pykg_traversal.py: multi-hop traversal on a small synthetic knowledge graph.
python examples/kg_traversal.py