privex.steemengine.objects.ObjBase¶
- class ObjBase(raw_data: Optional[Union[list, tuple, dict]] = None, *args, **kwargs)[source]¶
A base class to be extended by data storage classes, allowing their attributes to be accessed as if the class was a dict/list.
Also allows the class to be converted into a dict/list if raw_data is filled, like so:
dict(SomeClass())
Methods
__init__
([raw_data])contruct_self
(*args, **kwargs)from_list
(obj_list)Converts a
list
ofdict
's into aGenerator[cls]
of instances of the class you're calling this from.