https://github.com/colliery-io/graphqlite
A SQLite extension that adds graph database capabilities with Cypher query language support and built-in graph algorithms.
https://github.com/colliery-io/graphqlite
community-detection cypher graph-analytics graph-database graph-rag graphdb knowledge-graph neo4j python rust sql sqlite-extension sqlite3
Last synced: 19 days ago
JSON representation
A SQLite extension that adds graph database capabilities with Cypher query language support and built-in graph algorithms.
- Host: GitHub
- URL: https://github.com/colliery-io/graphqlite
- Owner: colliery-io
- License: mit
- Created: 2025-07-19T19:10:32.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2026-01-29T21:49:32.000Z (29 days ago)
- Last Synced: 2026-01-30T10:10:54.613Z (28 days ago)
- Topics: community-detection, cypher, graph-analytics, graph-database, graph-rag, graphdb, knowledge-graph, neo4j, python, rust, sql, sqlite-extension, sqlite3
- Language: C
- Homepage: https://colliery-io.github.io/graphqlite/
- Size: 3.74 MB
- Stars: 180
- Watchers: 1
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GraphQLite
An SQLite extension that adds graph database capabilities using the Cypher query language.
Store and query graph data directly in SQLite—combining the simplicity of a single-file, zero-config embedded database with Cypher's expressive power for modeling relationships.
## Installation
```bash
brew install graphqlite # macOS/Linux (Homebrew)
pip install graphqlite # Python
cargo add graphqlite # Rust
```
## Quick Start
```python
from graphqlite import Graph
g = Graph(":memory:")
g.upsert_node("alice", {"name": "Alice", "age": 30}, label="Person")
g.upsert_node("bob", {"name": "Bob", "age": 25}, label="Person")
g.upsert_edge("alice", "bob", {"since": 2020}, rel_type="KNOWS")
# Query with Cypher
results = g.query("MATCH (a:Person)-[:KNOWS]->(b) RETURN a.name, b.name")
# Built-in graph algorithms
g.pagerank()
g.louvain()
g.dijkstra("alice", "bob")
```
## Features
- **Cypher queries** — MATCH, CREATE, MERGE, SET, DELETE, WITH, UNWIND, RETURN
- **Graph algorithms** — PageRank, Louvain, Dijkstra, BFS/DFS, connected components, and more
- **Zero configuration** — Works with any SQLite database, no server required
- **Multiple bindings** — Python, Rust, and raw SQL interfaces
## Documentation
**[Full Documentation](https://colliery-io.github.io/graphqlite/)** — Tutorials, how-to guides, and API reference
## Examples
```bash
# SQL tutorials
sqlite3 < examples/sql/01_getting_started.sql
# GraphRAG with HotpotQA dataset
cd examples/llm-graphrag
uv sync && uv run python ingest.py
uv run python rag.py "Were Scott Derrickson and Ed Wood of the same nationality?"
```
## License
[MIT](LICENSE)