| |
- vcorelib.dict.codec.DictCodec(vcorelib.dict.codec.JsonCodec)
-
- RcmpyDictCodec
class RcmpyDictCodec(vcorelib.dict.codec.DictCodec) |
|
RcmpyDictCodec(data: Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]] = None, schemas: vcorelib.schemas.base.SchemaMap = None, dest_attr: str = 'data', verify: bool = True) -> None
A simple wrapper for package classes that want to implement DictCodec. |
|
- Method resolution order:
- RcmpyDictCodec
- vcorelib.dict.codec.DictCodec
- vcorelib.dict.codec.JsonCodec
- abc.ABC
- vcorelib.schemas.mixins.SchemaMixin
- builtins.object
Data and other attributes defined here:
- __abstractmethods__ = frozenset({'asdict', 'init'})
- __annotations__ = {'default_schemas': typing.Optional[vcorelib.schemas.base.SchemaMap]}
- default_schemas = {'Config': <vcorelib.schemas.json.JsonSchema obj...chemas.json.JsonSchema object at 0x7f6b13d20f20>}
Methods inherited from vcorelib.dict.codec.DictCodec:
- __init__(self, data: Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]] = None, schemas: vcorelib.schemas.base.SchemaMap = None, dest_attr: str = 'data', verify: bool = True) -> None
- Initialize this instance.
- init(self, data: Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]]) -> None
- Perform implementation-specific initialization.
Class methods inherited from vcorelib.dict.codec.DictCodec:
- create(data: Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]] = None, schemas: vcorelib.schemas.base.SchemaMap = None, dest_attr: str = 'data', verify: bool = True) -> ~V from abc.ABCMeta
- A factory method to create an instance.
Methods inherited from vcorelib.dict.codec.JsonCodec:
- __copy__(self: ~T) -> ~T
- Create another instance based on this instance's data.
- __eq__(self, other) -> bool
- Determine if this instance is equal to another.
- __str__(self) -> str
- Use the dictionary representation of this instance for string
representation.
- asdict(self) -> Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]]
- Obtain a dictionary representing this instance.
- encode(self, pathlike: Union[pathlib.Path, str, NoneType], arbiter: vcorelib.io.arbiter.DataArbiter = <vcorelib.io.arbiter.DataArbiter object at 0x7f6b1473c590>, **kwargs) -> Tuple[bool, int]
- Encode this object instance to a file.
Class methods inherited from vcorelib.dict.codec.JsonCodec:
- decode(pathlike: Union[pathlib.Path, str, NoneType], arbiter: vcorelib.io.arbiter.DataArbiter = <vcorelib.io.arbiter.DataArbiter object at 0x7f6b1473c590>, schemas: vcorelib.schemas.base.SchemaMap = None, dest_attr: str = 'data', verify: bool = True, require_success: bool = True, default_data: Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]] = None, **kwargs) -> ~T from abc.ABCMeta
- Decode an object instance from data loaded from a file.
- file_cache(pathlike: Union[pathlib.Path, str, NoneType], arbiter: vcorelib.io.arbiter.DataArbiter = <vcorelib.io.arbiter.DataArbiter object at 0x7f6b1473c590>, encode_kwargs: Dict[str, Any] = None, require_success: bool = False, **kwargs) -> Iterator[~T] from abc.ABCMeta
- Manage an instance of this class as a disk-backed file.
- normalize(data: Union[Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]], ~T]) -> ~T from abc.ABCMeta
- Ensure that some object is an instance of this class.
Data descriptors inherited from vcorelib.dict.codec.JsonCodec:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
Data and other attributes inherited from vcorelib.dict.codec.JsonCodec:
- __hash__ = None
Methods inherited from vcorelib.schemas.mixins.SchemaMixin:
- validate(self, valid_attr: str = 'data') -> None
- Validate an instance attribute based on this instance's schema.
Class methods inherited from vcorelib.schemas.mixins.SchemaMixin:
- schema_name() -> str from abc.ABCMeta
- A default name for this class's schema.
| |