Depots

class depot.Depots(data_dir=None, update=False, verbose=True)[source]

A class for collecting depot codes.

Parameters
  • data_dir (str or None) – name of data directory, defaults to None

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

Example:

>>> from pyrcs.other_assets import Depots

>>> depots = Depots()

>>> print(depots.Name)
Depot codes

>>> print(depots.SourceURL)
http://www.railwaycodes.org.uk/depots/depots0.shtm

Methods

collect_1950_system_codes([…])

Collect 1950 system (pre-TOPS) codes from source web page.

collect_four_digit_pre_tops_codes([…])

Collect four-digit pre-TOPS codes from source web page.

collect_gwr_codes([confirmation_required, …])

Collect Great Western Railway (GWR) depot codes from source web page.

collect_two_char_tops_codes([…])

Collect two-character TOPS codes from source web page.

fetch_1950_system_codes([update, pickle_it, …])

Fetch 1950 system (pre-TOPS) codes from local backup.

fetch_depot_codes([update, pickle_it, …])

Fetch depots codes from local backup.

fetch_four_digit_pre_tops_codes([update, …])

Fetch four-digit pre-TOPS codes from local backup.

fetch_gwr_codes([update, pickle_it, …])

Fetch Great Western Railway (GWR) depot codes from local backup.

fetch_two_char_tops_codes([update, …])

Fetch two-character TOPS codes from local backup.