Build against historical rows, then call the live method with the same core fields and
meanings. Every live row names its source. If latest() receives no rows, it
raises NoLiveDataError instead of returning an archive row.
1import asyncio 2from mostlyright import weather 3 4# newest report; missing data raises instead of going stale 5now = asyncio.run(weather.live.latest("KNYC"))
1import { weather } from "mostlyright"; 2 3// newest report; missing data raises instead of going stale 4const now = await weather.latest("KNYC");
The subject stays the same. Only the clock and upstream source change.
Historical and live rows share parser semantics, core fields, units, and identifiers within each dataset.
Every row identifies the feed that produced it. If training and live data use different feeds, the mismatch is explicit.
If the live source returns no rows, latest() raises
NoLiveDataError. It does not replace current data with an archive row.
Build features, joins, and validation on historical rows. Switch to live data with the same core fields and explicit source metadata.
Weather is the first supported dataset: live station observations, model forecasts, and historical reports use the same parser and core measurement fields.
Choose a dataset with historical and live methods.
Build and test features against historical rows.
Call the live method. It returns the same core fields plus explicit source and freshness metadata.