kinbaku.Graph.add_node¶
- Graph.add_node(key, attr=None)[source]¶
Add a single node to graph, with optional attributes.
- Parameters
key (str) – string key uniquely identifying a node
attr (dict, optional) – custom attributes. Must match the additional attributes provided in the node_class parameter. Defaults to None.
- Returns
returns node as an instance of Graph:node_class
- Return type
node_class