Get started
Quickstart
Install the SDK, request a private-beta API key, and pull your first point-in-time weather observation in under five minutes.
- 01 Install the SDK
- 02 Get an API key
- 03 Your first call
01 · Install
Section titled “01 · Install”pip install mostlyrightpoetry add mostlyrightuv add mostlyrightPython 3.11+. pandas is optional, install it if you want as_dataframe=True.
02 · Get an API key
Section titled “02 · Get an API key”Email [email protected] with your GitHub handle and what you’re building. Private beta. We’ll send a key.
Set it in your environment:
export MOSTLYRIGHT_API_KEY="mr_..."The SDK picks it up automatically. No configuration needed.
03 · Your first historical call
Section titled “03 · Your first historical call”from mostlyright import MostlyRightClient
client = MostlyRightClient()obs = client.observations( station="NYC", from_date="2026-04-01", to_date="2026-04-07",)
print(f"{len(obs)} observations")print(obs[0])curl -H "X-API-Key: $MOSTLYRIGHT_API_KEY" \ "https://api.mostlyright.md/observations?station=NYC&from_date=2026-04-01&to_date=2026-04-07"Expected output — a list of dicts, one row per observation, 30 raw fields each:
168 observations{ "station_code": "NYC", "observed_at": "2026-04-01T00:51:00Z", "observation_type": "METAR", "source": "IEM", "temp_f": 52, "temp_c": 11.1, "dewpoint_f": 45, "wind_dir_degrees": 270, "wind_speed_kt": 8, "altimeter_inhg": 30.12, "visibility_miles": 10.0, ...}Temperatures are stored unrounded. Wind is in knots. Pressure in inHg and hPa. Source and observation type are always present.
04 · Your first live METAR call
Section titled “04 · Your first live METAR call”from mostlyright import WeatherLive
with WeatherLive() as live: now = live.observations("NYC") print(now)WeatherLive hits AWC directly. Same field names as MostlyRightClient.observations() — column parity is enforced, so anything you did against historical data works against live with no code changes.
05 · Pick a station
Section titled “05 · Pick a station”Twenty stations in the current registry:
ATL AUS BOS DCA DEN DFW HOU LAS LAX MDWMIA MSP NYC ORD PDX PHX SAN SEA SFO STLUse the 3-letter NWS code for the station parameter on observations(). An unknown code returns 404. Call client.stations() for the canonical list.
The /stations/{code} endpoint is more permissive and accepts either the 3-letter NWS code ("NYC") or the 4-letter ICAO code ("KNYC"), case-insensitive, for metadata lookups.
List them programmatically:
for s in client.stations(): print(s.code, s.name)Try it live
Section titled “Try it live”Sandbox response. Edit the fields and run — mock data, no key required.
Request
// click "Run request" to see a real response What to read next
Section titled “What to read next”- Authentication — header format, env var fallback, rate limits.
- TherminalClient — every parameter of
observations()with worked examples. - API Reference — every HTTP endpoint.
- Data sources — why the source priority matters for settlement.