ai_flow.operators package

Submodules

ai_flow.operators.bash module

class ai_flow.operators.bash.BashOperator(name: str, bash_command: str, **kwargs)[source]

Bases: ai_flow.model.operator.AIFlowOperator

Parameters
  • name – The operator’s name.

  • kwargs – Operator’s extended parameters.

await_termination(context: ai_flow.model.context.Context, timeout: Optional[int] = None)[source]

Wait for a task instance to finish. :param context: The context in which the operator is executed. :param timeout: If timeout is None, wait until the task ends.

If timeout is not None, wait for the task to end or the time exceeds timeout(seconds).

start(context: ai_flow.model.context.Context)[source]

Start a task instance.

stop(context: ai_flow.model.context.Context)[source]

Stop a task instance.

ai_flow.operators.python module

class ai_flow.operators.python.PythonOperator(name: str, python_callable: Callable, op_args: Optional[List] = None, op_kwargs: Optional[Dict] = None, **kwargs)[source]

Bases: ai_flow.model.operator.AIFlowOperator

Parameters
  • name – The operator’s name.

  • kwargs – Operator’s extended parameters.

start(context: ai_flow.model.context.Context)[source]

Start a task instance.