fetch_data_from_file
- pyrcs.utils.fetch_data_from_file(cls, method, data_name, ext, update, dump_dir, verbose, data_dir=None, save_data_kwargs=None, **kwargs)
Fetch/load desired data from a backup file, depending on the given parameters.
- Parameters
cls (object) – (an instance of) a class for a certain data cluster
method (str) – name of a method of the
cls
, which is used for collecting the datadata_name (str) – key to the dict-type data of a certain cluster
ext (bool or str) – whether to save the data as a file, or file extension
update (bool) – whether to do an update check (for the package data), defaults to
False
dump_dir (str or os.PathLike[str] or None) – pathname of a directory where the data file is to be dumped, defaults to
None
verbose (bool or int) – whether to print relevant information in console
data_dir (str or os.PathLike[str] or None) – pathname of a directory where the data is fetched, defaults to
None
save_data_kwargs (dict or None) – equivalent of
kwargs
used by the functionpyrcs.utils.save_data_to_file()
, defaults toNone
kwargs (Any) – [optional] parameters of the
cls
.``method`` being called
- Returns
data fetched for the desired cluster
- Return type
dict or None