Graph API Reference
Description
Graph API Reference
HtmlGraph Class
Constructor
graph = HtmlGraph(directory="path/to/graph")
Methods
add(node, overwrite=False)
Add a node to the graph and save as HTML file.
filepath = graph.add(node)
get(node_id)
Retrieve a node by ID.
node = graph.get("task-001")
query(selector)
Query nodes using CSS selectors.
results = graph.query("[data-status='done']")
shortest_path(start, end, relationship=None)
Find shortest path between two nodes.
path = graph.shortest_path("a", "b", relationship="blocks")