mlm_insights.core.interfaces package

Submodules

mlm_insights.core.interfaces.serializable module

class mlm_insights.core.interfaces.serializable.Serializable

Bases: ABC

Abstract base class to make a class serializable, Base class mush implement serialize and deserialize methods.

abstract classmethod deserialize(serialized_bytes: bytes, **kwargs: Any) Serializable

Create a new instance from serialized bytes.

Parameters

serialized_bytesbytes

Serialized bytes as input.

Returns

Serializable

New instance of Serializable

abstract serialize(**kwargs: Any) bytes

Serialize the class to bytes. The bytes output must return the instance of the same class when deserialized.

Returns

bytes: Byte representation of object