Python bindings for the lance-graph Cypher engine
Project description
Lance Graph Python Package
This package exposes the Cypher graph query interface that wraps the
lance-graph Rust crate. Development uses uv
to manage dependencies inside a project-local .venv.
Quick start
cd python
uv venv --python 3.11 .venv
source .venv/bin/activate
uv pip install maturin[patchelf]
uv pip install -e '.[tests]'
maturin develop
pytest python/tests/ -v
Development workflow
For linting and type checks:
# Install dev dependencies
uv pip install -e '.[dev]'
# Run linters and type checker
ruff format python/ # format code
ruff check python/ # lint code
pyright # type check
# Run specific tests
pytest python/tests/test_graph.py::test_basic_node_selection -v
# Rebuild extension after Rust changes
maturin develop
If another virtual environment is already active, run
deactivate(orunset VIRTUAL_ENV) before invokinguv runso uv binds to.venv.
Repository layout
python/src/– PyO3 bridge that exposes graph APIs to Pythonpython/python/lance_graph/– pure-Python wrapper and__init__python/python/knowledge_graph/– CLI, FastAPI, and extractor utilities built on Lancepython/python/tests/– graph-centric functional tests
Refer to the repository root README.md for information about the Rust crate.
Run CLI commands through
uv run knowledge_graph .... The default uses an LLM-backed extractor; install the LLM extra withuv sync --extra llm(oruv pip install -e '.[llm]') and configureOPENAI_API_KEY. Installuv sync --extra lance-storageto enable Lance dataset persistence. Supply extra options (e.g.,base_url, HTTP headers) via--llm-config. Use--extractor heuristicto avoid LLM calls during testing or offline work.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lance_graph-0.2.0b1.tar.gz.
File metadata
- Download URL: lance_graph-0.2.0b1.tar.gz
- Upload date:
- Size: 305.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9453208819fb5628030a58a95c700cef07b8b2aea803cf73852f698cb57ab325
|
|
| MD5 |
d3166979b13b4b5e41024252c7f6b2c6
|
|
| BLAKE2b-256 |
e6f18aba97f5d8314a171c6a3e24f906b0f39d5872e6323e91d1a81420e01187
|
File details
Details for the file lance_graph-0.2.0b1-cp39-abi3-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: lance_graph-0.2.0b1-cp39-abi3-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 20.7 MB
- Tags: CPython 3.9+, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7172ce157d496f2827d4c7968f8fa111de33f093c635e45ecf28b296230fc906
|
|
| MD5 |
ee29b3059d914e4a036c53e3a3614175
|
|
| BLAKE2b-256 |
f28cf7fab76b3215a90900aeabff22877fd2819bbd2e5de96593b1ae0e2eb053
|