Skip to content

thimic/nodal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nodal

Actions Status

An execution graph for Python tasks.

Example

import nodal

from nodal.graph import Graph


def demo():

    # Create a graph
    graph = Graph()

    # Create nodes within the graph context to trigger graph callbacks.
    with graph:

        # Create a Plus node with value 3
        plus1 = nodal.nodes.Plus(3)

        # Create a Plus node with value 7 and plug into the first Plus
        plus2 = graph.create_node('Plus', 7)
        plus2.set_input(0, plus1)

        # Create an Output node and plug into the second Plus
        output = nodal.nodes.Output()
        output.set_input(0, plus2)

    # Execute graph
    graph.execute(output)


if __name__ == '__main__':
    demo()

About

An execution graph for Python tasks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages