Pydantic Support
Hatchet allows for you to optionally validate workflow inputs and step outputs using Pydantic (opens in a new tab).
Usage
To enable Pydantic for validation, you'll need to:
- Provide an
input_validator
as a parameter to yourworkflow
. - Add return type hints for your
steps
.
In addition, for improved IDE support and static type checking, you'll need to use typing.cast
to cast the workflow_input
and step_output
to their correct type.