module documentation

A data converter for Pydantic v2.

To use, pass pydantic_data_converter as the data_converter argument to temporalio.client.Client:

client = Client(
    data_converter=pydantic_data_converter,
    ...
)

Pydantic v1 is not supported.

Class PydanticJSONPlainPayloadConverter Pydantic JSON payload converter.
Class PydanticPayloadConverter Payload converter for payloads containing pydantic model instances.
Variable pydantic_data_converter Pydantic data converter.
pydantic_data_converter = (source) ΒΆ

Pydantic data converter.

Supports conversion of all types supported by Pydantic to and from JSON.

In addition to Pydantic models, these include all json.dump-able types, various non-json.dump-able standard library types such as dataclasses, types from the datetime module, sets, UUID, etc, and custom types composed of any of these.

To use, pass as the data_converter argument of temporalio.client.Client