BaseAlgorithm

class BaseAlgorithm[source]

Bases: UiInstruction

Define the base contract for instruction algorithms.

abstract property id

Return the unique algorithm identifier.

Returns:

Algorithm identifier.

Return type:

int

abstractmethod add_instruction(instruction)[source]

Add an instruction to the algorithm sequence.

Parameters:

instruction – Instruction to append.

abstract property instructions

Return the configured instructions.

Returns:

Instructions managed by the algorithm.

abstractmethod perform(ui: BaseUi, *args, **kwargs)[source]

Execute the algorithm for the provided UI context.

Parameters:
  • ui (BaseUi) – UI instance used during execution.

  • args – Additional positional arguments for the execution flow.

  • kwargs – Additional keyword arguments for the execution flow.