packages.valory.skills.abstract_
round_
abci.io_
.store
This module contains all the storing operations of the behaviours.
SupportedFiletype Objects
class SupportedFiletype(Enum)
Enum for the supported filetypes of the IPFS interacting methods.
AbstractStorer Objects
class AbstractStorer(ABC)
An abstract Storer
class.
__
init__
def __init__(path: str)
Initialize an abstract storer.
serialize_
object
@abstractmethod
def serialize_object(filename: str, obj: SupportedSingleObjectType,
**kwargs: Any) -> Dict[str, str]
Store a single file.
store
def store(obj: SupportedObjectType, multiple: bool,
**kwargs: Any) -> Dict[str, str]
Serialize one or multiple objects.
JSONStorer Objects
class JSONStorer(AbstractStorer)
A JSON file storer.
serialize_
object
def serialize_object(filename: str, obj: NativelySupportedSingleObjectType,
**kwargs: Any) -> Dict[str, str]
Serialize an object to JSON.
Arguments:
filename
: under which name the provided object should be serialized. Note that it will appear in IPFS with this name.obj
: the object to store.
Returns:
a dict mapping the name to the serialized object.
Storer Objects
class Storer(AbstractStorer)
Class which serializes objects.
__
init__
def __init__(filetype: Optional[Any],
custom_storer: Optional[CustomStorerType], path: str)
Initialize a Storer
.
serialize_
object
def serialize_object(filename: str, obj: NativelySupportedObjectType,
**kwargs: Any) -> Dict[str, str]
Store a single object.