towhee.runtime.operator_manager.operator_registry.OperatorRegistry

class towhee.runtime.operator_manager.operator_registry.OperatorRegistry[source]

Bases: object

Operator Registry

Methods

op_names

register

Register a class, function, or callable as a towhee operator.

resolve

Resolve operator by name

Attributes

REGISTRY

static register(name: Optional[str] = None)[source]

Register a class, function, or callable as a towhee operator.

Parameters:

name (str, optional) – operator name, will use the class/function name if None.

Returns:

[description]

Return type:

[type]

static resolve(name: str) Any[source]

Resolve operator by name