Zero configuration
No server to manage. Runs directly in your Python or TypeScript application.
Embedded graph database with Git-like branches and time travel.
Installation
# Setup: Knowledge Graph pour RAG
from casys_db import Database, Session
from casys_db import NodeEntity, HasMany
# Ouvrir base de prod
prod = Database("knowledge_graph.db")
# Schéma ORM (sans strings!)
class Topic(NodeEntity):
pass # label: "Topic"
class Document(NodeEntity):
topics = HasMany(Topic) # via auto: TOPICS
related = HasMany(Topic, via="ABOUT") # override
# Créer branche main si besoin
main = prod.branch("main")
Zero servers, runs in your process
Standard graph query language
Isolated transactions, consistent reads
Powerful graph queries with ISO GQL, fluent Python ORM
# Create nodes and relationships
from casys_db import Database
db = Database("social_network.db")
session = db.default_branch().session()
# Create Person nodes
session.execute("""
CREATE (alice:Person { name: 'Alice', age: 30 })
CREATE (bob:Person { name: 'Bob', age: 25 })
CREATE (carol:Person { name: 'Carol', age: 28 })
CREATE (alice)-[:KNOWS { since: 2020 } ]->(bob)
CREATE (alice)-[:KNOWS { since: 2019 } ]->(carol)
CREATE (bob)-[:KNOWS { since: 2021 } ]->(carol)
RETURN alice, bob, carol
""")
session.commit()
Everything you need to manage your graph data
Zero servers, zero configuration. Runs directly in your Python or TypeScript process. Starts in milliseconds.
Standard ISO GQL language. MATCH, WHERE, RETURN, EXISTS, WITH. Compatible with modern GQL tools.
Transactions with snapshot isolation. Consistent reads, isolated writes. No blocking locks.
Point-in-Time Recovery (PITR). Create branches from any commit. Explore complete history.
Type-safe query builder with lambdas. where(), select(), join_out(). Like SQLAlchemy but for graphs.
Compiled Rust engine. Single native library. Install in 3 seconds. No JVM, no Node.js required.
Point-in-Time Recovery and Git-like branches for your graph data
# Créer une branche depuis main
import casys_db
engine = casys_db.CasysEngine(data_dir="~/.casys_db")
db = engine.open_database("social")
# Créer une branche "main" si elle n'existe pas
engine.create_branch("social", "main")
# Créer une branche expérimentale depuis main
engine.create_branch("social", "experiment")
# Travailler sur experiment sans affecter main
exp_branch = engine.open_branch("social", "experiment")
result = exp_branch.query("""
CREATE (p:Person { name: 'Test User' })
RETURN p
""")
# main reste inchangé !
Test changes safely. Each branch is completely isolated.
Create a branch from any past commit. Debug easily.
Each commit = snapshot. No data loss, complete history.
CasysDB excels where data is connected
Find friends-of-friends, recommendations, community detection. 2-3 hop queries in milliseconds.
MATCH (user:Person)-[:KNOWS*2..3]->(friend)
WHERE user.id = $userId
RETURN DISTINCT friend Ontologies, RAG, semantic search. Complex relationships between entities, attributes, concepts.
MATCH (concept)-[:RELATED_TO*]->(topic)
WHERE concept.name = 'Machine Learning'
RETURN topic.name, COUNT(*) AS relevance Collaborative filtering, content-based recommendations. Find patterns in user interactions.
MATCH (u:User)-[:LIKES]->(i:Item)<-[:LIKES]-(similar:User)
WHERE u.id = $userId
RETURN i.name, COUNT(similar) AS score Fraud detection, supply chain, dependency tracking. Visualize and explore connections.
MATCH path = (start)-[:DEPENDS_ON*]->(end)
WHERE start.type = 'Service'
RETURN path, LENGTH(path) AS depth A modern, embedded, and powerful graph database.
No server to manage. Runs directly in your Python or TypeScript application.
Standard graph query language. Learn once, use everywhere.
Isolated transactions with MVCC. Point-in-Time Recovery to travel through history.
Why choose CasysDB for your graph data
| Feature | CasysDB | Neo4j | SQLite | PostgreSQL |
|---|---|---|---|---|
| Embedded (no server) | ✅ | ❌ | ✅ | ❌ |
| Native Graph Queries | ✅ | ✅ | ❌ | ⚠️ |
| Standard Language (ISO GQL) | ✅ | ⚠️ | ❌ | ⚠️ |
| MVCC Transactions | ✅ | ✅ | ❌ | ✅ |
| Time Travel (PITR) | ✅ | ❌ | ❌ | ❌ |
| Type-Safe ORM | ✅ | ❌ | ⚠️ | ⚠️ |
| Dependencies | 0 | JVM | 0 | Server |
| License | MIT | GPL/Commercial | Public Domain | PostgreSQL |
🚀 CasysDB combines SQLite's simplicity with graph database power, plus MVCC and Time Travel
CasysDB is open-source and ready to use. Check out the documentation or source code.