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.