SDK installation
01 · Install
Section titled “01 · Install”pip install mostlyrightPython 3.11 or newer. The wheel’s requires-python is >=3.11. Older versions are not supported.
02 · Optional dependencies
Section titled “02 · Optional dependencies”Install these separately if you need them:
pip install pandas # for as_dataframe=True on observations/forecasts/pairspip install pyarrow # for format="parquet" responsesNeither is required for basic use. (The wheel itself pulls a small dependency tree via httpx.)
03 · Import
Section titled “03 · Import”Two classes cover everything:
from mostlyright import MostlyRightClient # historical + climate + forecasts + pairsfrom mostlyright import WeatherLive # real-time METAR, direct from AWCTherminalClient is a drop-in alias for MostlyRightClient — kept for backward compatibility with earlier therminal-py users. Use MostlyRightClient in new code.
04 · Verify
Section titled “04 · Verify”from mostlyright import MostlyRightClient
client = MostlyRightClient()print(client.health())# {"status": "ok", "version": "0.14.1", "stations": 20, "data_dir_exists": true}
stations = client.stations()print(f"{len(stations)} stations available")If you see AuthenticationError, your MOSTLYRIGHT_API_KEY env var isn’t set. See Authentication.
05 · Agent usage
Section titled “05 · Agent usage”For AI agents, the SDK exposes its surface as a tools schema:
tools = client.as_tools()# list of function schemas compatible with Claude, GPT function-calling, etc.observations 4 params Historical hourly station observations, point-in-time correct.
forecasts 3 params NWS MOS and Open-Meteo forecasts for a station and window.
climate 3 params Daily climate aggregates (min / max / mean / precip).
stations 0 params List available stations with lat/lon and covered date ranges.
Pair it with the feature catalog for retrieval-aware prompts:
schema = client.feature_catalog()# dict of every observation field, unit, type, physical boundsWhat to install next
Section titled “What to install next”- TherminalClient — the client reference.
- Quickstart — end-to-end first call.