colliery-io/graphqlite

A SQLite extension that adds graph database capabilities with Cypher query language support and built-in graph algorithms.

C

513

91 commits

updated Oct 17, 2026

See the code

See what people are saying

SourceMessageScoreDate

GraphQLite: SQLite graph extension supporting Cypher

3

Feb 17, 2026

README

GraphQLite

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

brew install graphqlite       # macOS/Linux (Homebrew)
pip install graphqlite        # Python
cargo add graphqlite          # Rust

Quick Start

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

openCypher Conformance

GraphQLite is validated against the official openCypher Technology Compatibility Kit (TCK) — the canonical conformance suite for the Cypher query language. Current coverage:

AreaScenariosPassing
Overall3,88098.5%
Expressions (temporal, lists, maps, comparison, literals, …)2,59998.5%
Clauses (MATCH, WITH, MERGE, CREATE, SET, DELETE, UNWIND, …)1,25198.6%
Use cases (triadic selection, subgraph counting)30100%

Run it yourself with angreal test tck. The remaining gaps are tracked in docs/testing/semantic-coverage-matrix.md and concentrate in a few deep areas (DST-aware timezone arithmetic, nested existential subqueries, multi-row MERGE). Booleans, strings, null handling, CREATE/SET/DELETE/REMOVE, UNION, and SKIP/LIMIT are at 100%.

Documentation

Full Documentation — Tutorials, how-to guides, and API reference

Examples

# 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

community-detection
cypher
graph-analytics
graph-database
graphdb
graph-rag
knowledge-graph
neo4j
python
rust
sql
sqlite3
sqlite-extension

colliery-io/graphqlite

A SQLite extension that adds graph database capabilities with Cypher query language support and built-in graph algorithms.

C

513

91 commits

updated Oct 17, 2026

See the code

See what people are saying

SourceMessageScoreDate

GraphQLite: SQLite graph extension supporting Cypher

3

Feb 17, 2026

README

GraphQLite

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

brew install graphqlite       # macOS/Linux (Homebrew)
pip install graphqlite        # Python
cargo add graphqlite          # Rust

Quick Start

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

openCypher Conformance

GraphQLite is validated against the official openCypher Technology Compatibility Kit (TCK) — the canonical conformance suite for the Cypher query language. Current coverage:

AreaScenariosPassing
Overall3,88098.5%
Expressions (temporal, lists, maps, comparison, literals, …)2,59998.5%
Clauses (MATCH, WITH, MERGE, CREATE, SET, DELETE, UNWIND, …)1,25198.6%
Use cases (triadic selection, subgraph counting)30100%

Run it yourself with angreal test tck. The remaining gaps are tracked in docs/testing/semantic-coverage-matrix.md and concentrate in a few deep areas (DST-aware timezone arithmetic, nested existential subqueries, multi-row MERGE). Booleans, strings, null handling, CREATE/SET/DELETE/REMOVE, UNION, and SKIP/LIMIT are at 100%.

Documentation

Full Documentation — Tutorials, how-to guides, and API reference

Examples

# 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

community-detection
cypher
graph-analytics
graph-database
graphdb
graph-rag
knowledge-graph
neo4j
python
rust
sql
sqlite3
sqlite-extension

Project health

crates.io

Latest release

0.12.0 · Oct 17, 2026

Releases this year

32

Significant stargazers

Cemre Mengu

124 followers · starred Jan 2026

Ihor Stepanov

92 followers · starred Apr 2026

Owen Ou

768 followers · starred Jun 2026

Zephyr Lykos

210 followers · starred Aug 2026