uataq.get_site#
- uataq.get_site(SID)[source]#
Return site object from config file
- Parameters:
SID (
str) – The site ID.- Returns:
A site object: a
MobileSitefor a train or a bus, else aSite.- Return type:
- Raises:
ValueError – If the site ID is not in the configuration file (see When there is nothing to read).
Examples
The case of the ID does not matter:
>>> import uataq >>> uataq.get_site("wbb").SID 'WBB' >>> type(uataq.get_site("TRX01")).__name__ 'MobileSite'