Skip to content

TaskRegistration

Part of Tasks in the Python API reference.

Related guidance: concepts/tasks, how-to/receive-local-tasks, how-to/dispatch-local-tasks, quickstarts/effector-handler.

Runnable examples: receive_task.py, dispatch_task.py, receive_mesh_task.py, dispatch_mesh_task.py.

from picogrid_ecn_client import TaskRegistration

Describe one local task-handler registration.

TaskRegistration(
*,
registration_id: UUID,
entity_id: UUID,
command: str,
request_schema: dict[str, JsonValue],
result_schema: dict[str, JsonValue] | None = None,
registered_at: datetime,
)

Source · models/task.py

NameTypeRequiredDefaultConstraintsDescription
registration_idUUIDyesClient-generated UUID identifying the local registration.
entity_idUUIDyesUUID of the entity that handles the command.
commandstryesmin_length=1, max_length=128Registered command name, from 1 through 128 characters.
request_schemadict[str, JsonValue]yesJSON Schema object for the registered request model.
result_schemadict[str, JsonValue] | NonenoNoneOptional JSON Schema object for the registered result model.
registered_atdatetimeyesTimezone-aware UTC time when the handler was registered locally.

Version 0.2.0 · branch main