Registry / database / kglite

kglite

JSON →
library0.11.3pypypi✓ verified 84d ago

High-performance graph database library with Python bindings written in Rust. Current version 0.8.34, requires Python >=3.10. Active development with frequent releases (weekly to bi-weekly).

pip install kglite
INSTALL
IMPORT
SIG · KGLITE
K
kglite
databasepythonv0.11.3
Install
2.0s avg
Import
25ms
Disk
59MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.11.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 2.1s
py 3.11
✓ —
✓ 1.9s
py 3.12
✓ —
✓ 1.8s
py 3.13
✓ —
✓ 2.3s
py 3.9
✕ build_error
✕ build_error
59MB installed
● package 59MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

kglite
import kglite
Main package import. No common mistakes.

Basic usage: create a graph, add nodes/edges, run Cypher queries.

import kglite # Create an in-memory graph g = kglite.Graph() # Add nodes and edges g.add_node("1", labels=["Person"], properties={"name": "Alice"}) g.add_node("2", labels=["Person"], properties={"name": "Bob"}) g.add_edge("1", "2", "KNOWS") # Run a Cypher query result = g.run("MATCH (a:Person)-[:KNOWS]->(b:Person) RETURN a.name, b.name") for row in result: print(row)
Debug
Known issues
gotchaDefault Cypher query timeout changed per version. In 0.8.27 the default timeout was unified to 180_000 ms (3 min) for all storage modes. Previously memory had no default, mapped was 60s, disk was 10s. Set timeout_ms=0 to disable.
fix
Upgrade to >=0.8.27 or explicitly pass timeout_ms=0 for unbounded queries.
affects: <0.8.27
breakingGraph load from disk (slice-built) changed in 0.8.28, adding binary sidecars. Old serialized graphs may not load correctly. Rebuild graphs with current version.
fix
Regenerate any persisted graphs using kglite >=0.8.28.
affects: <0.8.28
deprecatedThe code_tree module (for AST-based code parsing) may change. Not yet stable API.
fix
Avoid relying on code_tree internals; use only public Cypher query API for production.
affects: all
gotchaMemory-mapped and disk storage modes have different performance characteristics. Use 'in_memory' for small graphs, 'mapped' for large graphs that fit in virtual memory, 'disk' for huge graphs that must be paged.
fix
Read documentation on storage modes before choosing one.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'kglite'
kglite not installed (requires Python >=3.10).
fix
pip install kglite
AttributeError: module 'kglite' has no attribute 'Graph'
Old version of kglite (<0.8?) or typo (case-sensitive).
fix
Upgrade: pip install -U kglite. Import: import kglite; kglite.Graph()
Upgrade
Version history
0.11.3latest on PyPI
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
kglite — pip install kglite · libregistry