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

Name Type Description Default
latitude float Latitude of the location. required
longitude float Longitude of the location. required

Methods

Name Description
fetch_archive Fetch historical data from Archive API.
fetch_forecast Fetch forecast data from Forecast API.

fetch_archive

weather.weather_client.WeatherClient.fetch_archive(start, end, timezone='UTC')

Fetch historical data from Archive API.

Parameters

Name Type Description Default
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

Name Type Description Default
days_ahead int Number of days ahead for the forecast. required
timezone str Timezone for the data (default “UTC”). 'UTC'