class Task: def execute(context: ExecutionContext) -> Awaitable[None] | None
@staticmethod def identifier() -> tuple[str, str]Base class for Tilebox workflows tasks. Inherit from this class to create a task. Inheriting also automatically applies the dataclass decorator.
Methods
Section titled “Methods”def Task.execute(context: ExecutionContext) -> Awaitable[None] | NoneThe entry point for the execution of the task. Define it as either def execute(...) -> None or async def execute(...) -> None. The runner waits for an asynchronous method to complete.
@staticmethoddef Task.identifier() -> tuple[str, str]Override a task identifier and specify its version. If not overridden, the identifier of a task defaults to the class name, and the version to v0.0.
Task Input Parameters
Section titled “Task Input Parameters”class MyTask(Task): message: str value: int data: dict[str, int]Optional task input parameters, defined as annotated class attributes. See Python task inputs for the supported types and their package requirements.