Condition

Condition class used for evaluation of intermediate data

Module: core

Methods and properties

Main methods and properties


__init__

Arguments:

  • validator (ConditionProtocol): Callable that returns bool value that define that condition is fulfilled or not.

  • schema (Component): Intermidiate evaluation.

  • state (Optional[List[Union[str, Tuple[str, str]]]], optional): Memory keys that will be used. If equals to None, memory will not be used. Defaults to None.

  • name (Optional[str], optional): Name for identification. If equals to None, class name will be used. Defaults to None.


__call__

Component Call

Arguments:

  • input_data (Transformable): Data for processing

  • evaluator (Optional[Evaluator], optional): Evaluator in context of which Condition executed.

Returns:

  • bool: Result of evaluation. Define that condition is fulfilled or not.




ConditionProtocol

Type that describes objects that can be used as conditions and validators in Condition. Equals to Callable[[Transformable, Evaluator], bool].



Last updated