MCPcopy Create free account
hub / github.com/bhowiebkr/PyFlowGraph / serialize

Method serialize

src/core/node_graph.py:367–378  ·  view source on GitHub ↗

Serializes all nodes, connections, and groups.

(self)

Source from the content-addressed store, hash-verified

365 return clipboard_data
366
367 def serialize(self):
368 """Serializes all nodes, connections, and groups."""
369 nodes_data = [node.serialize() for node in self.nodes]
370 connections_data = [conn.serialize() for conn in self.connections if conn.serialize()]
371 groups_data = [group.serialize() for group in self.groups] if hasattr(self, 'groups') else []
372 return {
373 "graph_title": self.graph_title,
374 "graph_description": self.graph_description,
375 "nodes": nodes_data,
376 "connections": connections_data,
377 "groups": groups_data
378 }
379
380 def deserialize(self, data, offset=QPointF(0, 0)):
381 """Deserializes graph data, creating all nodes, connections, and groups."""

Callers 1

copy_selectedMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected