NodeRef#

class tierkreis.core.tierkreis_graph.NodeRef(idx: int, graph: TierkreisGraph, outports: list[str] | None = None)[source]#

Bases: Iterable

A reference to a node in a Tierkreis graph.

Methods

default_nodeport

Output port name to use if none is specified.

with_retry_secs

If this NodeRef refers to a FunctionNode, set its retry time in seconds.

Attributes

outports

idx

graph

default_nodeport(create: bool = True) NodePort[source]#

Output port name to use if none is specified.

Raises:

ValueError – If there are multiple known output ports.

Returns:

Single output port if exactly one is known, else “value”.

with_retry_secs(retry_secs: int) NodeRef[source]#

If this NodeRef refers to a FunctionNode, set its retry time in seconds. Otherwise, raises ValueError.