Textforecast: API Reference#
- class yr_weather.Textforecast(headers: dict | None = {}, use_cache: bool | None = True)#
Bases:
BaseClientA client for interacting with the Yr Textforecast API.
- get_areas(area_type: Literal['land', 'sea', 'coast']) TextAreas#
Get available areas and their polygons.
- Parameters:
forecast (Literal["land", "sea", "coast"]) – One of the possible areas.
- Returns:
A typed dict with land, sea or coast areas, their polygons and names.
- Return type:
- get_forecasts(forecast: Literal['landoverview', 'coast_en', 'coast_no', 'sea_en', 'sea_no', 'sea_wmo']) TextForecasts#
Get text forcasts for a selected area.
- Parameters:
forecast (Literal["landoverview", "coast_en", "coast_no", "sea_en", "sea_no", "sea_wmo"]) – One of the possible forecast areas.
- Returns:
A typed dict with text forecasts for the selected area, defined in the forecast parameter.
- Return type: