|
- Method resolution order:
- DataArbiterDirectories
- vcorelib.io.arbiter.base.DataArbiterBase
- builtins.object
Methods defined here:
- decode_directory(self, pathlike: Union[pathlib.Path, str, NoneType], logger: Union[logging.Logger, logging.LoggerAdapter[Any]] = None, require_success: bool = False, path_filter: Callable[[pathlib.Path], bool] = None, recurse: bool = False, **kwargs) -> vcorelib.io.types.LoadResult
- Attempt to decode data files in a directory. Assigns data loaded from
each file to a key, returns whether or not any files failed to load
and the cumulative time that each file-load took.
- encode_directory(self, pathlike: Union[pathlib.Path, str, NoneType], data: Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]], ext: str = 'json', logger: Union[logging.Logger, logging.LoggerAdapter[Any]] = None, **kwargs) -> Tuple[bool, int]
- Encode data to a directory where every key becomes a file with the
provided extension. The encoding scheme is implied by the extension.
Methods inherited from vcorelib.io.arbiter.base.DataArbiterBase:
- __init__(self, logger: Union[logging.Logger, logging.LoggerAdapter[Any]] = <Logger vcorelib.io.arbiter.base (WARNING)>, encoding: str = 'utf-8') -> None
- Initialize a new data arbiter.
- decode(self, pathlike: Union[pathlib.Path, str, NoneType], logger: Union[logging.Logger, logging.LoggerAdapter[Any]] = None, require_success: bool = False, includes_key: str = None, preprocessor: Callable[[Union[TextIO, _io.StringIO]], Union[TextIO, _io.StringIO]] = None, maxsplit: int = 1, expect_overwrite: bool = False, strategy: vcorelib.dict.MergeStrategy = <MergeStrategy.RECURSIVE: 1>, files_loaded: List[pathlib.Path] = None, **kwargs) -> vcorelib.io.types.LoadResult
- Attempt to load data from a file.
- decode_stream(self, ext: str, stream: Union[TextIO, _io.StringIO], logger: Union[logging.Logger, logging.LoggerAdapter[Any]] = None, **kwargs) -> vcorelib.io.types.LoadResult
- Attempt to load data from a text stream.
- encode(self, pathlike: Union[pathlib.Path, str, NoneType], data: Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]], logger: Union[logging.Logger, logging.LoggerAdapter[Any]] = None, maxsplit: int = 1, **kwargs) -> Tuple[bool, int]
- Encode data to a file on disk.
- encode_stream(self, ext: str, stream: Union[TextIO, _io.StringIO], data: Dict[str, Union[str, int, float, bool, NoneType, Dict[str, Union[str, int, float, bool, NoneType]], List[Union[str, int, float, bool, NoneType]]]], logger: Union[logging.Logger, logging.LoggerAdapter[Any]] = None, **kwargs) -> Tuple[bool, int]
- Serialize data to an output stream.
Data descriptors inherited from vcorelib.io.arbiter.base.DataArbiterBase:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|