{"id":23935,"library":"kglite","title":"kglite","description":"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).","status":"active","version":"0.8.34","language":"python","source_language":"en","source_url":"https://github.com/kkollsga/kglite","tags":["graph-database","cypher","rust","high-performance"],"install":[{"cmd":"pip install kglite","lang":"bash","label":"pip install"}],"dependencies":[],"imports":[{"note":"Main package import. No common mistakes.","wrong":null,"symbol":"kglite","correct":"import kglite"}],"quickstart":{"code":"import kglite\n\n# Create an in-memory graph\ng = kglite.Graph()\n\n# Add nodes and edges\ng.add_node(\"1\", labels=[\"Person\"], properties={\"name\": \"Alice\"})\ng.add_node(\"2\", labels=[\"Person\"], properties={\"name\": \"Bob\"})\ng.add_edge(\"1\", \"2\", \"KNOWS\")\n\n# Run a Cypher query\nresult = g.run(\"MATCH (a:Person)-[:KNOWS]->(b:Person) RETURN a.name, b.name\")\nfor row in result:\n    print(row)\n","lang":"python","description":"Basic usage: create a graph, add nodes/edges, run Cypher queries."},"warnings":[{"fix":"Upgrade to >=0.8.27 or explicitly pass timeout_ms=0 for unbounded queries.","message":"Default 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.","severity":"gotcha","affected_versions":"<0.8.27"},{"fix":"Regenerate any persisted graphs using kglite >=0.8.28.","message":"Graph 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.","severity":"breaking","affected_versions":"<0.8.28"},{"fix":"Avoid relying on code_tree internals; use only public Cypher query API for production.","message":"The code_tree module (for AST-based code parsing) may change. Not yet stable API.","severity":"deprecated","affected_versions":"all"},{"fix":"Read documentation on storage modes before choosing one.","message":"Memory-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.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install kglite","cause":"kglite not installed (requires Python >=3.10).","error":"ModuleNotFoundError: No module named 'kglite'"},{"fix":"Upgrade: pip install -U kglite. Import: import kglite; kglite.Graph()","cause":"Old version of kglite (<0.8?) or typo (case-sensitive).","error":"AttributeError: module 'kglite' has no attribute 'Graph'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}