Skip to content

packages.valory.skills.abstract_round_abci.io_.load

This module contains all the loading operations of the behaviours.

AbstractLoader Objects

class AbstractLoader(ABC)

An abstract Loader class.

load_single_object

@abstractmethod
def load_single_object(serialized_object: str) -> NativelySupportedSingleObjectType

Load a single object.

load

def load(serialized_objects: Dict[str, str]) -> SupportedObjectType

Load one or more serialized objects.

Arguments:

  • serialized_objects: A mapping of filenames to serialized object they contained.

Returns:

the loaded file(s).

JSONLoader Objects

class JSONLoader(AbstractLoader)

A JSON file loader.

load_single_object

def load_single_object(serialized_object: str) -> NativelySupportedSingleObjectType

Read a json file.

Arguments:

  • serialized_object: the file serialized into a JSON string.

Returns:

the deserialized json file's content.

Loader Objects

class Loader(AbstractLoader)

Class which loads objects.

__init__

def __init__(filetype: Optional[Any], custom_loader: CustomLoaderType)

Initialize a Loader.

load_single_object

def load_single_object(serialized_object: str) -> SupportedSingleObjectType

Load a single file.