easysnowdata.stations.networks.Network#

class easysnowdata.stations.networks.Network(id: str, title: str, client: str, requires: tuple[str, ...], extent: str, data_provider: str, api_url: str, id_key: str, colon_code: bool = False, code_pattern: str | None = None)[source]#

Bases: object

One snow-station network and the client that reads it.

client: str#

Class name in easysnowdata.stations.clients.

requires: tuple[str, ...]#

Auth providers the API needs (§5).

id_key: str#

Key in the client’s station dicts that holds the native station id.

colon_code: bool = False#

True when code is the station id with : swapped for _.

code_pattern: str | None = None#

Regex a code of this network matches; None when it cannot be told apart from another network’s by shape alone.

client_class() Any[source]#

Import and return the client class.

station_id(station: str) str[source]#

The native station id for station (a code or an id already).

code(station_id: str) str[source]#

The globally unique code for a native station_id.