pyiem.network module#

Network Table.

class pyiem.network.Table(network, cursor=None, only_online=True)[source]#

Bases: object

Our class

get_threading_id(sid, valid)[source]#

Return a station identifier (not iemid) based on threading.

Lookup what the threaded station identifier is based on this given timestamp/date.

Parameters:
  • sid (str) – station identifier to check threading for.

  • valid (datetime.date) – lookup for comparison.

Return type:

str

get_id_by_key(key, value)[source]#

Find a station id by a given attribute = value.

Parameters:
  • key (str) – attribute to lookup.

  • value (mixed) – value to compare against

Returns:

station_id

Return type:

str