graph_from_networkx#

eclypse.io.graphs.graph_from_networkx(graph, *, kind, context=None)[source]#

Build an ECLYPSE graph from a NetworkX graph.

Parameters:
  • graph (nx.DiGraph) – The NetworkX graph to convert.

  • kind (GraphKind) – The graph kind to create.

  • context (IOContext | None) – Optional import/export customisation.

Returns:

The converted graph object.

Return type:

AssetGraph

Raises:

ValueError – If kind is unsupported.