leaf_engine_flows.serializer

Classes

LeafCheckpointSerializer

A thin wrapper around the prefect PandasSerializer.

Module Contents

class leaf_engine_flows.serializer.LeafCheckpointSerializer(*args, **kwargs)

Bases: prefect.engine.serializers.PandasSerializer

A thin wrapper around the prefect PandasSerializer.

Useful for writing and reading checkpoints. Treats pandas dataframes as the default PandasSerializer does, but will take single values and write them as a single column, single row csv. Will deserialize them back to a single value.

deserialize(value: bytes) Any

Handles deserializing single value dataframes into their original python types.

Parameters:

value (bytes) –

Return type:

Any

serialize(value: Any) bytes
Parameters:

value (Any) –

Return type:

bytes