seaflow.nodes package

Submodules

seaflow.nodes.node module

Module Introduction

This is a node class that loads Function object. Its main functions are node instantiation of Function object, and the main technology is property descriptor dynamic properties

  • Design mode:

    nothing

  • Key points:

    1. Property Descriptor Dynamic Properties

  • Main functions:

    1. Objectification function nodes

Usage examples

Class Description

class seaflow.nodes.node.Node(func, inputs, outputs, name)

Bases: object

Class Introduction:

This is a node class that loads Function object. Its main functions are node instantiation of Function object, and the main technology is property descriptor dynamic properties.

Attribute Function:

Define a node class attribute initialization method.

Parameters:
  • func (object) - Function object.

  • inputs (list) - Input list.

  • outputs (list) - Output list.

  • name (str) - Function name.

property func

Method Function:

Define a descriptor protocol property dynamic property to obtain Function object method.

get_func()

Method Function:

Define a method for obtaining node functions.

Returns:

  • node_func (object) - node function object.

get_inputs()

Method Function:

Define a method for obtaining node input parameters.

Returns:

  • node_inputs (list) - node input list.

get_name()

Method Function:

Define a method for obtaining node name.

Returns:

  • name (object) - node name.

get_outputs()

Method Function:

Define a method for obtaining a node output list.

Returns:

  • node_outputs (list) - node output list.

property inputs

Method Function:

Define a descriptor protocol dynamic attribute acquisition input method.

Returns:

  • _inputs (list) - Parameter attribute input.

property name

Method Function:

Define a Descriptor Protocol Dynamic Attribute Get Name Method.

Returns:

  • _name (str) - Parameter attribute name.

property outputs

Method Function:

Define a descriptor protocol dynamic attribute acquisition output method.

Returns:

  • _outputs (list) - Parameter attribute output.

run(*args, **kwargs)

Method Function:

Define a method for running a node.

Parameters:
  • args (tuple) - Input parameter tuples.

  • kwargs (dict) - Input parameter dictionary.

Returns:

  • run_result (object) - run the result object.

Module contents