Skip to Content
cwa
API reference

Stations

stations.get

def get(station: str) -> Station
def get(station: Sequence[str]) -> Mapping[str, Station]

Look up one or more stations by ID.

client.stations.get(station: str) -> Station
client.stations.get(station: Sequence[str]) -> Mapping[str, Station]
await async_client.stations.get(station: str) -> Station
await async_client.stations.get(station: Sequence[str]) -> Mapping[str, Station]

stations.list

def list(*, county: County | None = None) -> tuple[Station, ...]

List stations, optionally within one county.

client.stations.list(*, county: County | None = None) -> tuple[Station, ...]
await async_client.stations.list(*, county: County | None = None) -> tuple[Station, ...]

stations.nearest

def nearest(location: PointInput, *, limit: int = 1, max_distance_km: float | None = None) -> tuple[NearbyStation, ...]

Find stations closest to a township or coordinate.

client.stations.nearest(location: PointInput, *, limit: int = 1, max_distance_km: float | None = None) -> tuple[NearbyStation, ...]
await async_client.stations.nearest(location: PointInput, *, limit: int = 1, max_distance_km: float | None = None) -> tuple[NearbyStation, ...]

NearbyStation

station: Station
distance_km: float

A station and its horizontal WGS84 distance in kilometres.

Station

id: str
name: str
coordinates: Coordinates
source: Source
county: County | None
township: Township | None
elevation_m: float | None

A station from CWA’s current observation feed.