Skip to content

mostlyright.weather.stations

mostlyright.weather.stations — the canonical home for the station catalog.

The namespace inversion moves Station / CATALOG / StationCatalog out of the machinery-only root and under the weather domain: a station is a weather fact, not root machinery. This module is the canonical public home the root mostlyright.Station / mostlyright.CATALOG / mostlyright.StationCatalog shims delegate to (with a DeprecationWarning).

Split-distribution firewall (REQUIREMENTS.md RESEARCH-05): the catalog IMPLEMENTATION stays in core (mostlyright.stations / mostlyright._internal._stations) so mostlyrightmd never gains a runtime dependency on mostlyrightmd-weather. This module re-exports that implementation in the weather direction (weather already depends on core), giving the symbols their canonical public home under mr.weather.stations without inverting the dependency graph.

alias of StationInfo

class mostlyright.weather.stations.StationCatalog(stations=None)

Section titled “class mostlyright.weather.stations.StationCatalog(stations=None)”

Bases: object

Read-only view over the station registry with venue/country filters.

Lookups accept either the registry key (3-letter NWS code for US stations, ICAO for international) or the 4-letter ICAO directly, so get("NYC"), get("KNYC"), and get("EGLL") all resolve.

  • Parameters: stations (dict [str , Station ] | None)

Return stations whose ISO 3166-1 alpha-2 country matches, sorted by ICAO.

  • Return type: list[StationInfo]
  • Parameters: country (str)

Return stations tagged with venue (e.g. "kalshi"), sorted by ICAO.

  • Return type: list[StationInfo]
  • Parameters: venue (str)

Return the station for code (registry key or ICAO).

  • Raises: KeyError – when no station matches.
  • Return type: StationInfo
  • Parameters: code (str)

Return the union of all venue tags present in the catalog.