dispatchrun / dispatch-py

Python package to develop applications with Dispatch.
https://pypi.org/project/dispatch-py/
Apache License 2.0
54 stars 3 forks source link

Avoid pickling primitive values and proto messages #179

Closed chriso closed 3 months ago

chriso commented 3 months ago

This PR updates the SDK to avoid using pickle to serialize inputs and outputs unless necessary.

If an input or output value is a protobuf message, it's now serialized directly.

If an input or output value is primitive (null, boolean, integer, float, string, bytes, timestamp, duration), we serialize it using one of the built-in protobuf wrappers.

If an input or output value is a JSON-like list or dict, we serialize it using the built-in structpb wrappers.