weather.weather_client.WeatherClient
weather.weather_client.WeatherClient(latitude, longitude)
Client for fetching weather data from Open-Meteo API. Handles the low-level API interactions, parameter building, and response parsing.
Parameters
| latitude |
float |
Latitude of the location. |
required |
| longitude |
float |
Longitude of the location. |
required |
Methods
fetch_archive
weather.weather_client.WeatherClient.fetch_archive(start, end, timezone='UTC')
Fetch historical data from Archive API.
Parameters
| start |
pd.Timestamp |
Start date for the historical data. |
required |
| end |
pd.Timestamp |
End date for the historical data. |
required |
| timezone |
str |
Timezone for the data (default “UTC”). |
'UTC' |
fetch_forecast
weather.weather_client.WeatherClient.fetch_forecast(days_ahead, timezone='UTC')
Fetch forecast data from Forecast API.
Parameters
| days_ahead |
int |
Number of days ahead for the forecast. |
required |
| timezone |
str |
Timezone for the data (default “UTC”). |
'UTC' |