Skip to content

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.

Terminal window
pip uninstall mostlyright
pip install '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.

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_KEY
df = 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:

Terminal window
unset MOSTLYRIGHT_API_KEY

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.

There is no legacy @tradewinds/* or @mostlyright/* scope on npm. The TS SDK at 0.1.0-rc.7 is the first npm release.

Terminal window
pnpm add mostlyright@next

The @next dist-tag tracks the rc series. When 0.1.0 final ships, drop @next to track the stable release:

Terminal window
pnpm add mostlyright

See the TypeScript quickstart for the first-call walkthrough.

If you also need to migrate the on-disk cache (the ~/.tradewinds/~/.mostlyright/ rename plus the TRADEWINDS_CACHE_DIRMOSTLYRIGHT_CACHE_DIR env-var rename), see Cache migration. A single mv ~/.tradewinds ~/.mostlyright covers both Python and TypeScript SDKs.