A platform for designing node-based workflows.
pip install --upgrade --user node_graph
Check the docs and learn about the features.
A simple math calculation
from node_graph import NodeGraph, node
@node()
def add(x, y):
return x + y
ng = NodeGraph(name="example")
add1 = ng.add_node(add, x=1, y=2)
add2 = ng.add_node(add, x=3)
ng.add_link(add1.outputs.result, add2.inputs.y)
ntdata = ng.to_dict()