towhee.runtime.node_repr.IterationRepr

class towhee.runtime.node_repr.IterationRepr(type: str, param: Optional[Dict[str, any]] = None)[source]

Bases: object

IterationRepr for iteration representations.

Parameters:
  • type (str) – The type of the iteration, such as ‘map’, ‘flat_map’, ‘filter’, ‘time_window’.

  • param (Dict[str, any]) – The parameter for the iteration, defaults to None.

Methods

from_dict

Return a IterationRepr from a description dict.

Attributes

param

type

__init__(type: str, param: Optional[Dict[str, any]] = None)[source]
static from_dict(iter_info: Dict[str, Any]) IterationRepr[source]

Return a IterationRepr from a description dict.

Parameters:

iter_info (Dict[str, Any]) – Dictionary about iteration information.

Returns:

IterationRepr object.