mostlyright.weather.stations
mostlyright.weather.stations — the canonical home for the station catalog.
Station, CATALOG, and StationCatalog live here rather than at the
package root: a station is a weather fact, not root machinery. This module is the
canonical public home that the root mostlyright.Station /
mostlyright.CATALOG / mostlyright.StationCatalog shims delegate to (with a
DeprecationWarning).
Split-distribution firewall: 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.
CITIES / City / CityCatalog ride the same firewall: the city index is
implemented in core (mostlyright._cities / mostlyright._internal._cities)
and re-exported here, so CITIES.get("new_york") is the start-here discovery
call beside the station catalog it indexes.
class mostlyright.weather.stations.City(key, name, country, stations, venue_stations)
Section titled “class mostlyright.weather.stations.City(key, name, country, stations, venue_stations)”Bases: object
A city and the registry stations that observe it.
- Parameters:
snake_case ASCII join key (e.g. "new_york").
Display name in its native spelling (e.g. "São Paulo").
country
Section titled “country”ISO 3166-1 alpha-2 code, shared by all of the city’s stations.
stations
Section titled “stations”ICAOs serving this city, sorted, at least one.
venue_stations
Section titled “venue_stations”venue -> ICAOs for the stations that venue settles
against, derived from Station.venues. A venue with no station in
this city is absent, so an empty mapping means no prediction-market
venue settles here.
country: str
Section titled “country: str”stations: tuple[str, ...]
Section titled “stations: tuple[str, ...]”venue_stations: Mapping[str, tuple[str, ...]]
Section titled “venue_stations: Mapping[str, tuple[str, ...]]”class mostlyright.weather.stations.CityCatalog(cities=None)
Section titled “class mostlyright.weather.stations.CityCatalog(cities=None)”Bases: object
Read-only city index over the station registry.
Lookups normalize their argument, so get("new_york"),
get("New York") and get("new-york") all resolve to the same record.
- Parameters: cities (Iterable [City ] | None)
filter_by_country(country)
Section titled “filter_by_country(country)”Return cities whose ISO 3166-1 alpha-2 country matches, sorted by key.
filter_by_venue(venue)
Section titled “filter_by_venue(venue)”Return cities with at least one station tagged venue, sorted by key.
get(key)
Section titled “get(key)”Return the city for key (city key or display name).
venues()
Section titled “venues()”Return the union of all venue tags present in the catalog.
mostlyright.weather.stations.Station
Section titled “mostlyright.weather.stations.Station”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.
filter_by_country(country)
Section titled “filter_by_country(country)”Return stations whose ISO 3166-1 alpha-2 country matches, sorted by ICAO.
filter_by_venue(venue)
Section titled “filter_by_venue(venue)”Return stations tagged with venue (e.g. "kalshi"), sorted by ICAO.
get(code)
Section titled “get(code)”Return the station for code (registry key or ICAO).
venues()
Section titled “venues()”Return the union of all venue tags present in the catalog.