SDK ExamplebeginnerSDK Examples

Logic Threshold (SDK: Multiple Outputs)

Compares a value against a threshold and outputs both a boolean (above/below) and the numerical difference. Shows how to return multiple typed outputs from execute().

class LogicThresholdNode(BaseNode)SDK Node · Logic

SDK Features Demonstrated

Python BaseNode SDK
from src.nodes.base import BaseNode
class LogicThresholdNode(BaseNode):
multiple outputs
execute() return dict
float widget
Port preview

Tags

#sdk#logic#threshold#multiple-outputs#execute

Source

examples/nodes/logic_threshold.py

Python BaseNode subclass demonstrating SDK patterns

Related Examples

Browse all →
class MathSquareNode(BaseNode):
use_exec=False
set_output()
Python SDK

Math Square (SDK: use_exec=False)

beginner

A data-only node (use_exec=False) that squares an input number. Demonstrates set_output(), log_info(), and icon_path — the minimal data-flow node pattern.

use_exec=Falseset_output()log_info()
#sdk#use_exec#data-flow
class ConnectionLoggerNode(BaseNode):
on_plug_sync()
on_unplug_sync()
Python SDK

Connection Logger (SDK: Lifecycle Hooks)

beginner

Demonstrates on_plug_sync and on_unplug_sync lifecycle hooks. Logs a message each time a wire is connected or disconnected, showing the plug/unplug event system.

on_plug_sync()on_unplug_sync()log_info()
#sdk#on_plug_sync#on_unplug_sync
class DropdownSelectorNode(BaseNode):
use_exec=False
widget_type="dropdown"
Python SDK

Dropdown Selector (SDK: Widget Options)

beginner

A use_exec=False node with a dropdown widget: options list is defined in add_input(). Demonstrates how to build UI select menus in Python BaseNode subclasses.

use_exec=Falsewidget_type="dropdown"options list
#sdk#dropdown#widget_type