plopp.core.Node#

class plopp.core.Node(func, *parents, **kwparents)[source]#

A node that can have parent and children nodes, to create a graph. A node can be constructed from a callable func, or a raw object. In the case of a raw object, a node wrapping the object will be created.

Parameters:
  • func (Any) – The callable that is called when data is requested from the node. This can also be a raw object, in which case this becomes a callable that returns the object.

  • *parents (Any) – Positional arguments that represent the positional arguments of the function func.

  • *kwparents (Any) – Keyword arguments that represent the keyword arguments of the function func.

__init__(func, *parents, **kwparents)[source]#

Methods

__init__(func, *parents, **kwparents)

add_kwparents(**parents)

Add one or more keyword parents to the node.

add_parents(*parents)

Add one or more parents to the node.

add_view(view)

Add a view to the node.

notify_children(message)

Notify all of the node's children with message.

notify_views(message)

Notify the node's views with message.

remove()

Remove the node from the graph.

request_data()

Request data from the node.

Attributes

id

The unique uuid of the node.

input_value

The input value of the node, if it is an input node.

is_input_node

Whether the node is an input node.