squirrel.serialization.serializer

Module Contents

Classes

SquirrelSerializer

Helper class that provides a standard way to create an ABC using

class squirrel.serialization.serializer.SquirrelSerializer

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

abstract deserialize(obj: Any)Any

Returns the deserialized object.

deserialize_shard_from_file(fp: str, **kwargs)Iterable[squirrel.constants.SampleType]

Reads a shard from file and returns an iterable over the values of its samples.

abstract serialize(obj: Any)Any

Returns the serialized object.

serialize_shard_to_file(obj: squirrel.constants.ShardType, fp: str, **kwargs)None

Serializes a list of samples and writes it to a file.