towhee.runtime.schema_repr.SchemaRepr

class towhee.runtime.schema_repr.SchemaRepr(name: str, type: ColumnType)[source]

Bases: object

A SchemaRepr represents the data queue schema.

Parameters:
  • name (str) – The name column data.

  • type (ColumnType) – The type of the column data, such as ColumnType.SCALAR or ColumnType.QUEUE.

Methods

from_dag

Return a SchemaRepr from the dag info.

Attributes

name

type

__init__(name: str, type: ColumnType)[source]
static from_dag(col_name: str, iter_type: str, inputs_type: Optional[List] = None)[source]

Return a SchemaRepr from the dag info.

Parameters:
  • col_name (str) – Schema name.

  • iter_type (Dict[str, Any]) – The iteration type of this node.

  • inputs_type (List) – A list of the inputs schema type.

Returns:

SchemaRepr object.