ocrd_network.models.workflow module¶
- class ocrd_network.models.workflow.DBWorkflowScript(*args: Any, _id: PydanticObjectId | None = None, revision_id: UUID | None = None, workflow_id: str, content: str, content_hash: str)[source]¶
Bases:
DocumentModel to store a workflow-script in the database
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.
- workflow_id: str¶
- content: str¶
- content_hash: str¶
- model_config = {'alias_generator': <function document_alias_generator>, 'json_schema_extra': <function json_schema_extra>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None¶
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.