BBBikeDownloader.get_prepacked_data

classmethod BBBikeDownloader.get_prepacked_data(meth, data_name='<data_name>', file_stem=None, ext='.pkl', update=False, confirmation_required=True, dump_backup=True, verbose=False, confirmation_prompt_note='', action_prompt_note='', action_prompt_end=' ... ', ending_message='Done.', raise_error=False, **kwargs)[source]

Get auxiliary data (that is to be prepacked in the package).

Parameters:
  • meth (Callable) – name of a class method for getting (auxiliary) prepacked data

  • data_name (str) – name of the prepacked data, defaults to '<data_name>'

  • file_stem – The filename (without file extension) that overrides data_name for determining file path. Defaults to None.

  • ext (str) – File extension of the filename of prepacked data; defaults to ".pkl".

  • update (bool) – whether to (check on and) update the prepacked data, defaults to False

  • confirmation_required (bool) – whether asking for confirmation to proceed, defaults to True

  • dump_backup (bool) – If True, save a cached data file.

  • ending_message (str) – The ending message to print.

  • verbose (bool | int) – whether to print relevant information in console, defaults to False

  • confirmation_prompt_note (str) – additional message for the method compose_cfm_msg(), defaults to ""

  • action_prompt_note (str) – equivalent of the parameter note of the method print_action_msg(), defaults to ""

  • action_prompt_end (str) – equivalent of the parameter end of the method print_action_msg(), defaults to " ... "

  • raise_error (bool) – Whether to raise the provided exception; if raise_error=False (default), the error will be suppressed.

Returns:

auxiliary data

Return type:

Any

Examples:

>>> from pydriosm.downloader._base import BaseDownloader
>>> data = BaseDownloader.get_prepacked_data(print, verbose=True, raise_error=True)
Proceed to retrieve/compile data of <data_name>
? [No]|Yes: yes
Retrieving/compiling the data ...
Done.
>>> data is None
True