orkes.graph.Edge#
- class orkes.graph.Edge(from_node, to_node=None, max_passes=25)[source]#
Represents a directed connection between two nodes in the graph.
This is an abstract base class that should not be instantiated directly.
- Parameters:
from_node (NodePoolItem)
to_node (NodePoolItem)
- id#
A unique identifier for the edge instance.
- Type:
str
- from_node#
The node from which the edge originates.
- Type:
- to_node#
The node to which the edge points.
- Type:
- passes#
The number of times the edge has been traversed.
- Type:
int
- max_passes#
The maximum number of times the edge can be traversed.
- Type:
int
- edge_type#
The type of the edge.
- Type:
str
- __init__(from_node, to_node=None, max_passes=25)[source]#
Initializes an Edge.
- Parameters:
from_node (NodePoolItem) – The node from which the edge originates.
to_node (NodePoolItem, optional) – The node to which the edge points. Defaults to None for conditional edges where the destination is determined at runtime.
max_passes (int, optional) – The maximum number of times the graph execution can traverse this edge. This helps prevent infinite loops. Defaults to 25.
Methods
__init__(from_node[, to_node, max_passes])Initializes an Edge.