Skip to main content

An execution graph for Python tasks

Project description

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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nodal-0.0.2.tar.gz (10.3 kB view hashes)

Uploaded Source

Built Distribution

nodal-0.0.2-py3-none-any.whl (16.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page