DoWhile#

class council.runners.DoWhile(predicate: Callable[[ChainContext], bool], runner: RunnerBase)[source]#

Bases: RunnerBase

Runner that executes an inner Runner while the given predicate returns True. The predicate is executed at the end of the loop. As such, the inner runner executes at least once.

__init__(predicate: Callable[[ChainContext], bool], runner: RunnerBase) None[source]#
Parameters:
  • predicate – a predicate function

  • runner – a runner to be executed while the predicate returns True

render_as_dict(include_children: bool = True) Dict[str, Any]#

returns the graph of operation as a dictionary

render_as_json() str#

returns the graph of operation as a JSON string