mara
mara copied to clipboard
Improve stores
Stores are mostly stubs at the moment:
- store and restore probably need to return/accept a constructor dict too
- might be nice to lock keys to make it safer. or maybe just use a dataclass.
Serialisable store class
-
store()
->str
- serialise to json, or to some unique ID -
restore(str)
- deserialise from json or unique ID
Top-level client.store - SessionStore
:
- dataclass-style. actually a dataclass?
- do we want annotations and type hinting - pydantic?
- or keep it simple for now, and just go with a dict
Needs to be extensible - user code needs to be able to add fields.