Skip to content
PACKAGES

Node

Kind: class

Source: src/graphrefly/_facade.py:565

Node(graph: Graph, node_id: str)

A typed handle to one node of a graph.

NameTypeDescription
namestrReturn the node’s name, its id in the graph.
has_valueboolReturn whether this node retains a DATA value.
statusNodeStatusReturn the node’s derived status: cache, output and lifecycle.
cache(default: object = _NO_DEFAULT) -> object

Return the latest retained DATA value, or default when it holds none.

Source: src/graphrefly/_facade.py:584

subscribe(callback: Callable[[Array[T]], object]) -> Subscription

Subscribe to this node: callback gets each array as a tuple of messages.

The first array is START followed by the node’s snapshot. A callback that raises goes to the graph’s reporter as a SubscriberCallbackError; it is not the node’s ERROR, and nothing keeps it.

Source: src/graphrefly/_facade.py:611