Depots.collect_gwr_codes¶
-
Depots.
collect_gwr_codes
(confirmation_required=True, verbose=False)[source]¶ Collect Great Western Railway (GWR) depot 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 GWR depot codes and date of when the data was last updated
- Return type
dict or None
Example:
>>> from pyrcs.other_assets import Depots >>> depots = Depots() >>> gwr_codes_dat = depots.collect_gwr_codes() To collect data of GWR codes? [No]|Yes: yes >>> type(gwr_codes_dat) <class 'dict'> >>> print(list(gwr_codes_dat.keys())) ['GWR codes', 'Last updated date']