punchbowl.auto.control.cache_layer.loader_base_class#

Attributes#

T

Classes#

LoaderABC

Interface for passing callable objects instead of file paths to be loaded.

Module Contents#

punchbowl.auto.control.cache_layer.loader_base_class.T#
class punchbowl.auto.control.cache_layer.loader_base_class.LoaderABC[source]#

Bases: punchbowl.util.DataLoader[T]

Interface for passing callable objects instead of file paths to be loaded.

abstractmethod gen_key() str[source]#

Generate a cache key

abstractmethod src_repr() str[source]#

Return a string representation of the source data (e.g. a file path)

abstractmethod load_from_disk() T[source]#

Load the object

abstractmethod __repr__()[source]#

Return a string representation of this loader

load() T[source]#

Load the data.

try_caching(object: T) None[source]#
to_bytes(object: T) bytes[source]#
from_bytes(bytes: LoaderABC.from_bytes.bytes) T[source]#
__str__()[source]#