Skip to content

mostlyright.stations

Venue-agnostic station catalog (Phase 22).

A station is a physical fact; the prediction-market venue that settles on it is metadata. Before Phase 22 the US-city universe lived in mostlyright.markets.catalog.kalshi_stations — coupling general-purpose weather stations to a single venue even though the same cities trade on Polymarket and are valid query targets with no market at all.

This module exposes the canonical registry (mostlyright._internal._stations) as a venue-agnostic StationCatalog. Markets derives its settlement universe by filtering on venue tags; bare-data users ignore venues entirely.

Station is an alias for the registry’s StationInfo record — there is one source of station truth, not two.

StationPublic name for the station record.
CATALOGProcess-wide default catalog over the canonical registry.
StationCatalog([stations])Read-only view over the station registry with venue/country filters.

mostlyright.stations.CATALOG = <mostlyright.stations.StationCatalog object>

Section titled “mostlyright.stations.CATALOG = <mostlyright.stations.StationCatalog object>”

Process-wide default catalog over the canonical registry.

Public name for the station record. The registry dataclass IS the public shape — re-exported (not duplicated) so there is a single source of truth.

class mostlyright.stations.StationCatalog(stations=None)

Section titled “class mostlyright.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.