Graph OGM
Map Python classes to nodes and edges. Typed fields, indexes, constraints, lazy/eager relationships, and a fluent query builder.
For Cypher-based graph databases โ FalkorDB, ArcadeDB, Neo4j, Memgraph, Apache AGE.
from runic.ogm import Field, Node, Repository, Session, create_driver
class Person(Node, labels=["Person"]):
id: str = Field(index=True)
name: str
email: str = Field(index=True, unique=True)
driver = create_driver("falkordb", host="localhost", port=6379, graph="myapp")
with Session(driver) as session:
session.add(Person(id="alice", name="Alice", email="alice@example.com"))
session.commit()
repo = Repository(session, Person)
print(repo.count()) # 1See the OGM Quickstart or Migration Quickstart to get up and running.