WorkerParameters

class mcai_worker_sdk.WorkerParameters

Worker parameters base class to extend to define the parameters of your worker.

Examples

>>> class McaiWorkerParameters(mcai.WorkerParameters):
>>>   action: str
>>>   number: int
>>>   array_of_strings: list[str]
>>>   array_of_integers: list[int]

Note

Some parameters can be declared as optional. Use Optional from typing to do so.

Note

The parameter class will also have an attribute requirements autogerenated by StepFlow and directly handled by the SDK.

Warning

You should take special care when defining this class to type properly its attributes. Under the hood, attributes types will be used by the SDK to cast parameters arriving from the backend into their proper Python type.