Mostly Right Docs
The public-data SDK for quants, ML pipelines, and AI agents. One schema for weather observations, economic indicators, and prediction-market data. Local-first, MIT licensed, on PyPI and npm.
Access
Section titled “Access”Mostly Right is a local-first Python and TypeScript SDK for settlement-grade public data. Access is currently by request: the SDK is distributed to teams we work with rather than through public package installs. Request access (or the Request access button above) and we will get you set up. Distribution details in Packages & versioning.
Start in 60 seconds
Section titled “Start in 60 seconds”One call returns observations joined to the settlement record that resolves the contract, one row per day:
from mostlyright import weather
df = weather.pairs("KNYC", "2025-01-06", "2025-01-12")import { dataset } from "mostlyright";
const rows = await dataset("KNYC", "2025-01-06", "2025-01-12", { label: "cli" });Full walkthrough with real output in the Quickstart. The root reads as the product map: import mostlyright as mr exposes the domains (mr.weather, mr.econ, mr.markets), two verbs (mr.align, mr.spine), and the typed errors; every domain repeats the same grammar (pairs, label.*, sources).
Pick your path
Section titled “Pick your path”- Training a model? Build a training table: from one frame to a leakage-safe, cross-validated model on real settlement data.
- Composing your own dataset? Compose a dataset:
spine+align, label recipes, and bringing your own data into the guarded join. - Building an agent? The SDK runs inside your agent’s runtime, no API key. Point your model at /llms.txt for the machine-readable index.
- TypeScript or browser? The Quickstart TS tab, then Browser integration for service workers, MV3, and edge runtimes.
By domain
Section titled “By domain”- Weather: Observations & live, Forecasts, Quality control
- Markets: Kalshi & Polymarket: every contract mapped to the station and value it settles on
- Econ: Indicators & vintages: CPI, payrolls, GDP with first-class revision safety
Understand the guarantees
Section titled “Understand the guarantees”- Temporal safety:
knowledge_time,KnowledgeView, and why backtests replay exactly - Data sources: source identity, raw-as-reported, and the client-side dedup tiebreak
- Daily windows: local-standard-time day boundaries that settle contracts
Reference
Section titled “Reference”- API surface: the domain map and core signatures; the full generated reference ships with access
- Packages & versioning: install matrix, lockstep policy, deprecations
- Changelog: every release, mirrored from the SDK repo
Stay in the loop
Section titled “Stay in the loop”Already have access? Your distribution channel carries release notes. Otherwise, request access and tell us what you are building; that is also where new datasets and hosted features get announced first.