Legacy migration (Python mostlyright 0.14.1 → mostlyrightmd 0.1.0+)
The PyPI package mostlyright==0.14.1 is the legacy hosted-API client. It made HTTP calls to api.mostlyright.xyz, required an API key, and returned point-in-time data through a proxy. The new SDK is local-first: it ships as mostlyrightmd on PyPI, calls AWC, IEM, GHCNh, and NWS CLI directly, and writes a parquet cache to ~/.mostlyright/cache/. There is no hosted backend and no API key.
If you have an existing import mostlyright from the 0.14.1 client, the swap is two steps: change the PyPI name in your dependency manifest, and verify the call sites against the new API surface. The Python import path stays import mostlyright — only the package name on PyPI changed.
For TypeScript users: there is no legacy npm scope. The TS SDK at 0.1.0-rc.7 is a first install, not a migration.
Python — swap the package
Section titled “Python — swap the package”pip uninstall mostlyrightpip install 'mostlyrightmd[research]>=0.1.0,<0.2'uv remove mostlyrightuv add 'mostlyrightmd[research]>=0.1.0,<0.2'poetry remove mostlyrightpoetry add 'mostlyrightmd[research]>=0.1.0,<0.2'The [research] extra installs mostlyrightmd-weather and mostlyrightmd-markets alongside the core join, plus the pandas and pyarrow runtime deps that research() needs.
Python — adapt the call sites
Section titled “Python — adapt the call sites”The legacy 0.14.1 client used MostlyRightClient.pairs(station, from_date, to_date). The new SDK exposes the same workflow as a top-level research() function:
from mostlyright import MostlyRightClient
client = MostlyRightClient() # required MOSTLYRIGHT_API_KEYdf = client.pairs( station="KNYC", from_date="2025-01-06", to_date="2025-01-12",)import mostlyright
df = mostlyright.research( station="KNYC", from_date="2025-01-06", to_date="2025-01-12",)The DataFrame returned is byte-equivalent to the legacy client.pairs() output on the 5 parity fixtures captured at the rename. Column names, dtypes, row order, and null handling all match. If your downstream code does df.head(), df.iloc[0], or column-by-name access, no further change is needed.
The MOSTLYRIGHT_API_KEY environment variable is no longer used. You can unset it:
unset MOSTLYRIGHT_API_KEYPython — remove the hosted-API surfaces
Section titled “Python — remove the hosted-API surfaces”The legacy client also shipped client.observations(), client.climate(), client.snapshot(), client.forecasts(), and client.stations(). The new SDK exposes equivalents at module level:
| Legacy (hosted) | New (local) |
|---|---|
client.pairs(station, from_, to_) | mostlyright.research(station, from_, to_) |
WeatherLive().observations(station) | await mostlyright.live.latest(station) |
client.snapshot() | mostlyright.snapshot.build_snapshot(...) |
client.stations() | mostlyright._internal._stations.STATIONS |
mostlyright.live.stream(station) is the new async-generator live ticker; see the Python quickstart §05 for an example.
TypeScript — first install
Section titled “TypeScript — first install”There is no legacy @tradewinds/* or @mostlyright/* scope on npm. The TS SDK at 0.1.0-rc.7 is the first npm release.
pnpm add mostlyright@nextnpm install mostlyright@nextyarn add mostlyright@nextThe @next dist-tag tracks the rc series. When 0.1.0 final ships, drop @next to track the stable release:
pnpm add mostlyrightSee the TypeScript quickstart for the first-call walkthrough.
Cache directory rename — separate doc
Section titled “Cache directory rename — separate doc”If you also need to migrate the on-disk cache (the ~/.tradewinds/ → ~/.mostlyright/ rename plus the TRADEWINDS_CACHE_DIR → MOSTLYRIGHT_CACHE_DIR env-var rename), see Cache migration. A single mv ~/.tradewinds ~/.mostlyright covers both Python and TypeScript SDKs.
See also
Section titled “See also”- Cache migration — the
tradewinds→mostlyrightcache and env-var rename. - Python quickstart — first call after the swap.
- TypeScript quickstart — TS-side first install.