Depots.collect_two_char_tops_codes

Depots.collect_two_char_tops_codes(confirmation_required=True, verbose=False)[source]

Collect two-character TOPS codes from source web page.

Parameters
  • confirmation_required (bool) – whether to prompt a message for confirmation to proceed, defaults to True

  • verbose (bool, int) – whether to print relevant information in console as the function runs, defaults to False

Returns

data of two-character TOPS codes and date of when the data was last updated

Return type

dict or None

Example:

>>> from pyrcs.other_assets import Depots

>>> depots = Depots()

>>> two_char_tops_codes_dat = depots.collect_two_char_tops_codes()
To collect data of two character TOPS codes? [No]|Yes: yes

>>> type(two_char_tops_codes_dat)
<class 'dict'>
>>> print(list(two_char_tops_codes_dat.keys()))
['Two character TOPS codes', 'Last updated date']