node
Node.
This module defines the Node class and related types for workflow graphs.
AbstractSerializableComponent
A serializable component.
Node dataclass
Bases: AbstractSerializableComponent
A node within a container (graph or group).
__getitem__(input_name)
Get node input (static value or connection).
__setitem__(input_name, static_value)
Set node input static value.
connect(output_name, destination_node, destination_input_name)
Connect specific output to another node input.
disconnect_input(input_name, input_idx=-1)
Reset connection of incoming input.
NodeConnection dataclass
A connection to a specific node.
PluginRef dataclass
A reference to a Plugin (name + version).
get_input_default(input_def)
Get the default value for a plugin input definition.
For array inputs without an explicit default, returns an empty list. For other inputs, returns the explicit default or None.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_def | InputAttribute | Plugin input definition. | required |
Returns:
| Type | Description |
|---|---|
Any | The default value for the input. |
is_array_input(input_def)
Check if an input definition represents an array type.
This function examines the input definition to determine if it should be treated as an array parameter. It supports modern List[X] type hints (e.g., List[str], List[int]).
Uses typing.get_origin() for Python 3.9+ compatibility to detect generic List types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_def | InputAttribute | Plugin input definition. | required |
Returns:
| Type | Description |
|---|---|
bool | True if the input is an array type, False otherwise. |
is_multi_connection_input(input_def)
Check if an input definition represents a multi connection input.