GraphML and GEXF
GraphML and GEXF helpers from annnet.io.graphml.
annnet.io.graphml
GraphML/GEXF import and export helpers for AnnNet.
Provides: to_graphml(G, path, ...) -> None from_graphml(path, ...) -> AnnNet to_gexf(G, path, ...) -> None from_gexf(path, ...) -> AnnNet
GraphML and GEXF support are implemented through NetworkX because NetworkX already owns mature readers and writers for these formats. This module is therefore an intentional IO-to-adapter bridge: AnnNet is first projected to a NetworkX graph, then NetworkX handles the file format.
This is an accepted boundary exception.
Classes
Functions
to_graphml
Export via NetworkX with reified hyperedges; sanitize attrs for GraphML.
Also writes a sidecar manifest for lossless re-import.
from_graphml
Import via NetworkX; if a sidecar manifest is present, use it as SSOT.
Otherwise, fall back to a best-effort no-manifest import with type restoration.
to_gexf
Export an AnnNet graph to GEXF via NetworkX.