ocrd_network.models.messages module

class ocrd_network.models.messages.PYResultMessage(*, job_id: str, state: JobState = JobState.unset, path_to_mets: str | None = None, workspace_id: str | None = None)[source]

Bases: BaseModel

Wraps the parameters required to make a result message request

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

job_id: str
state: JobState
path_to_mets: str | None
workspace_id: str | None
model_config = {'json_schema_extra': {'example': {'job_id': 'd8e36726-ed28-5476-b83c-bc31d2eecf1f', 'path_to_mets': '/path/to/mets.xml', 'state': JobState.success, 'workspace_id': 'c7f25615-fc17-4365-a74d-ad20e1ddbd0e'}}}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].