Skip to content

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.

  1. 01 Install the SDK
  2. 02 Get an API key
  3. 03 Your first call
Terminal window
pip install mostlyright

Python 3.11+. pandas is optional, install it if you want as_dataframe=True.

Email [email protected] with your GitHub handle and what you’re building. Private beta. We’ll send a key.

Set it in your environment:

Terminal window
export MOSTLYRIGHT_API_KEY="mr_..."

The SDK picks it up automatically. No configuration needed.

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])

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.

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.

Twenty stations in the current registry:

ATL AUS BOS DCA DEN DFW HOU LAS LAX MDW
MIA MSP NYC ORD PDX PHX SAN SEA SFO STL

Use 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)

Sandbox response. Edit the fields and run — mock data, no key required.

Live playground

Request

Response
// click "Run request" to see a real response