DOT / Graphviz Format
Read Graphviz DOT (.gv / .dot) graphs as node then edge records (via NetworkX / pydot).
Overview
| Property | Value |
|---|---|
| Format id | gv (alias dot) |
| Class | DOTIterable |
| Extensions | .gv, .dot |
| Read | Yes |
| Write | No |
| Extra | graph (networkx) |
| Maturity | stable |
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
- GEXF — GEXF graphs
- GraphML — GraphML graphs
- Supported formats