Skip to content

contango.strategy.rule_based.actions.action

contango.strategy.rule_based.actions.action

Action

Bases: ABC, Generic[C, R]

An object that executes a single action or behavior.

Attributes:

Name Type Description
C

The context type for the action to be passed into the execute() method.

R

The return type for the action when executed.

execute abstractmethod

execute(context: C) -> R

Executes the behavior of the action.

Source code in src\contango\strategy\rule_based\actions\action.py
21
22
23
24
25
26
@abstractmethod
def execute(self, context: C) -> R:
    """
    Executes the behavior of the action.
    """
    ...