Skip to main content

DOT / Graphviz Format

Read Graphviz DOT (.gv / .dot) graphs as node then edge records (via NetworkX / pydot).

Overview

PropertyValue
Format idgv (alias dot)
ClassDOTIterable
Extensions.gv, .dot
ReadYes
WriteNo
Extragraph (networkx)
Maturitystable

Record shape

{"_type": "node", "id": "A", "label": "start"}
{"_type": "edge", "source": "A", "target": "B"}

Requires NetworkX with pydot support for DOT parsing.

Usage

from iterable import open_iterable

with open_iterable("graph.dot") as source:
for rec in source:
print(rec["_type"], rec)

Install with pip install iterabledata[graph].

See also