Core
- class openweatherwrap.core.AirPollutionResponse(data)
Bases:
objectClass to handle the response data for air pollution information. It provides methods to extract various air quality parameters from the response data.
- get_ammonia()
Returns a list of ammonia (NH₃) levels for the air pollution data. The NH₃ levels are typically measured in micrograms per cubic meter (µg/m³).
- get_aqi()
Returns a list of Air Quality Index (AQI) values for the air pollution data. The AQI is typically an integer representing the air quality level.
- get_carbon_monoxide()
Returns a list of carbon monoxide (CO) levels for the air pollution data. The CO levels are typically measured in micrograms per cubic meter (µg/m³).
- get_coord()
Returns the coordinates of the location from the response data. The coordinates are typically represented as a list of two integers [longitude, latitude].
- get_nitrogen_dioxide()
Returns a list of nitrogen dioxide (NO₂) levels for the air pollution data. The NO₂ levels are typically measured in micrograms per cubic meter (µg/m³).
- get_nitrogen_monoxide()
Returns a list of nitrogen monoxide (NO) levels for the air pollution data. The NO levels are typically measured in micrograms per cubic meter (µg/m³).
- get_ozone()
Returns a list of ozone (O₃) levels for the air pollution data. The O₃ levels are typically measured in micrograms per cubic meter (µg/m³).
- get_pm10()
Returns a list of PM10 (particulate matter with a diameter of less than 10 micrometers) levels for the air pollution data. The PM10 levels are typically measured in micrograms per cubic meter (µg/m³).
- get_pm2_5()
Returns a list of PM2.5 (particulate matter with a diameter of less than 2.5 micrometers) levels for the air pollution data. The PM2.5 levels are typically measured in micrograms per cubic meter (µg/m³).
- get_sulphur_dioxide()
Returns a list of sulphur dioxide (SO₂) levels for the air pollution data. The SO₂ levels are typically measured in micrograms per cubic meter (µg/m³).
- class openweatherwrap.core.CurrentWeatherResponse(data, mode='json')
Bases:
objectA class to handle the response from the OpenWeather Current Weather API.
- get_base()
Returns the base of the weather data from the response data.
Returns None if the mode is ‘xml’ since the base is not available in those formats.
- get_city_id()
Returns the city ID from the response data. The city ID is typically an integer representing the unique identifier of the city.
- get_city_name()
Returns the city name from the response data. The city name is typically a string representing the name of the city.
- get_clouds()
Returns the cloudiness from the response data. Cloudiness is typically measured as a percentage (0-100%).
- get_clouds_name()
Returns the name of the cloudiness from the response data. The name is typically a string representing the cloudiness category.
Returns None if the mode is ‘json’ since the name is not available in that format.
- get_country()
Returns the country code from the response data. The country code is typically a two-letter ISO 3166-1 alpha-2 code.
Returns None if the mode is ‘xml’ since country code is not available in those formats.
- get_feels_like()
Returns the feels-like temperature from the response data. Feels-like temperature is typically measured in degrees Celsius (°C) or Fahrenheit (°F).
- get_feels_like_unit()
Returns the unit of the feels-like temperature from the response data. The unit is typically ‘metric’ for Celsius or ‘imperial’ for Fahrenheit.
Returns None if the mode is ‘json’ since the unit is not available in that format.
- get_ground_level_pressure()
Returns the ground level pressure from the response data. Ground level pressure is typically measured in hPa (hectopascals).
Returns None if the mode is ‘xml’ since ground level pressure is not available in those formats.
- get_humidity()
Returns the humidity from the response data. Humidity is typically measured as a percentage (0-100%).
- get_humidity_unit()
Returns the unit of the humidity from the response data. The unit is typically ‘percent’ for percentage.
Returns None if the mode is ‘json’ since the unit is not available in that format.
- get_lastupdate()
Returns the last update time from the response data. The last update is a string in the format ‘YYYY-MM-DD HH:MM:SS’.
Returns None if the mode is ‘json’ since last update time is not available in those formats.
- get_latitude()
Returns the latitude from the response data. Latitude will be a value between -90 and 90.
- Return latitude:
Latitude as a float.
- Return type:
- get_longitude()
Returns the longitude from the response data. Longitude will be a value between -180 and 180.
- Return longitude:
Longitude as a float.
- Return type:
- get_pressure()
Returns the atmospheric pressure from the response data. Pressure is typically measured in hPa (hectopascals).
- get_pressure_unit()
Returns the unit of the atmospheric pressure from the response data. The unit is typically ‘hPa’ (hectopascals).
Returns None if the mode is ‘json’ since the unit is not available in that format.
- get_rain()
Returns the rain volume from the response data. Rain volume is typically measured in millimeters/hour (mm/h).
- get_sea_level_pressure()
Returns the sea level pressure from the response data. Sea level pressure is typically measured in hPa (hectopascals).
Returns None if the mode is ‘xml’ since sea level pressure is not available in those formats.
- get_snow()
Returns the snow volume from the response data. Snow volume is typically measured in millimeters/hour (mm/h).
- get_sunrise()
Returns the sunrise time from the response data. Sunrise time is typically represented as a Unix timestamp (seconds since epoch).
Sunrise will be a string in XML or HTML mode, while in JSON mode it will be an integer.
- get_sunset()
Returns the sunset time from the response data. Sunset time is typically represented as a Unix timestamp (seconds since epoch).
Sunset will be a string in XML or HTML mode, while in JSON mode it will be an integer.
- get_sys_id()
Returns the system ID from the response data. The system ID is typically an integer representing the unique identifier of the system.
Returns None if the mode is ‘xml’ since system ID is not available in those formats.
- get_sys_message()
Returns the system message from the response data. The system message is typically a float representing additional information about the system.
Returns None if the mode is ‘xml’ since system message is not available in those formats.
- get_sys_type()
Returns the system type from the response data. The system type is typically an integer representing the type of data.
Returns None if the mode is ‘xml’ since system type is not available in those formats.
- get_temparature()
Returns the current temperature from the response data. Temperature is typically measured in degrees Celsius (°C) or Fahrenheit (°F).
- get_temperature_max()
Returns the maximum temperature from the response data. Maximum temperature is typically measured in degrees Celsius (°C) or Fahrenheit (°F).
- get_temperature_min()
Returns the minimum temperature from the response data. Minimum temperature is typically measured in degrees Celsius (°C) or Fahrenheit (°F).
- get_temperature_unit()
Returns the unit of the temperature from the response data. The unit is typically ‘metric’ for Celsius or ‘imperial’ for Fahrenheit.
Returns None if the mode is ‘json’ since the unit is not available in that format.
- get_time()
Returns the time of the weather data from the response data. The time is typically represented as a Unix timestamp (seconds since epoch).
Returns None if the mode is ‘xml’ since time is not available in those formats.
- get_timezone()
Returns the timezone offset from the response data. The timezone offset is typically represented in seconds from UTC.
- get_visibility()
Returns the visibility from the response data. Visibility is typically measured in meters.
The maximum visibility is 10,000 meters, and values above this are often capped at 10,000.
- get_weather_description()
Returns the weather description from the response data.
- get_weather_icon()
Returns the weather icon code from the response data.
- get_weather_id()
Returns the weather condition ID from the response data.
- Return weather_id:
Weather condition ID as an integer.
- Return type:
- get_weather_main()
Returns the main weather description from the response data.
Returns None if the mode is ‘xml’ since the main description is not available in those formats.
- get_wind_deg()
Returns the wind direction from the response data. Wind direction is typically measured in degrees (0-360).
- get_wind_direction()
Returns the wind direction as a string from the response data. The direction is typically represented as a cardinal direction (e.g., ‘N’, ‘NE’, ‘E’, etc.).
Returns None if the mode is ‘json’ since the direction is not available in that format.
- get_wind_direction_full()
Returns the full wind direction as a string from the response data. The full direction is typically represented as a more descriptive string (e.g., ‘North’, ‘Northeast’, etc.).
Returns None if the mode is ‘json’ since the full direction is not available in that format.
- get_wind_gust()
Returns the wind gust speed from the response data. Wind gust speed is typically measured in meters per second (m/s).
Returns None if the mode is ‘xml’ since wind gust speed is not available in those formats.
- get_wind_speed()
Returns the wind speed from the response data. Wind speed is typically measured in meters per second (m/s).
- get_wind_speed_name()
Returns the name of the wind speed from the response data. The name is typically a string representing the wind speed category.
Returns None if the mode is ‘json’ since the name is not available in that format.
- class openweatherwrap.core.FiveDayForecastResponse(data, mode='json')
Bases:
objectA class to handle the response from the OpenWeather 5-Day Forecast API.
- get_altitude()
Returns the altitude of the city from the response data. The altitude is typically a float representing the height above sea level in meters.
Returns -1.0 if the mode is ‘json’ since altitude is not available in those formats.
- Return altitude:
Altitude as a float or None.
- Return type:
- get_calctime()
Returns the calculation time from the response data. The calculation time is typically represented as a Unix timestamp (seconds since epoch).
Returns -1 if the mode is ‘json’ since calculation time is not available in those formats.
- Return calc_time:
Calculation time as an integer (Unix timestamp).
- Return type:
- get_city_id()
Returns the city ID from the response data. The city ID is typically an integer representing the unique identifier of the city.
Returns -1 if the mode is ‘xml’ since city ID is not available in those formats.
- Return city_id:
City ID as an integer or None.
- Return type:
- get_city_name()
Returns the city name from the response data. The city name is typically a string representing the name of the city.
- get_clouds()
Returns a list of cloudiness values for each forecast entry. Cloudiness is typically measured as a percentage (0-100%).
- get_clouds_name()
Returns a list of cloudiness names for each forecast entry. The cloudiness name is typically a string representing the cloudiness category (e.g., ‘clear’, ‘cloudy’).
Returns an empty list if the mode is ‘json’ since the name is not available in that format.
- get_clouds_unit()
Returns the units of the cloudiness from the response data. The units are typically ‘percent’ for percentage.
Returns an empty list if the mode is ‘json’ since the unit is not available in that format.
- get_count()
Returns the count of forecast entries from the response data. The count is typically an integer representing the number of forecast entries.
The count is an internal parameter.
Returns an empty list if the mode is ‘xml’ since the count is not available in those formats.
- Return count:
Count of forecast entries as an integer.
- Return type:
- get_country()
Returns the country code from the response data. The country code is typically a string representing the ISO 3166-1 alpha-2 code of the country.
- get_feels_like()
Returns a list of feels-like temperatures for each forecast entry. Feels-like temperature is typically measured in degrees Celsius (°C) or Fahrenheit (°F).
- get_feels_like_unit()
Returns the units of the feels-like temperature from the response data. The units are typically ‘Celsius’ for metric or ‘Fahrenheit’ for imperial.
Returns an empty list if the mode is ‘json’ since the unit is not available in that format.
- get_geobase()
Returns the geobase of the city from the response data. The geobase is typically a string representing the geographical base of the city.
Returns an empty string if the mode is ‘json’ since geobase is not available in those formats.
- get_geobase_id()
Returns the geobase ID of the city from the response data. The geobase ID is typically an integer representing the unique identifier of the geographical base.
Returns -1 if the mode is ‘json’ since geobase ID is not available in those formats.
- Return geobase_id:
Geobase ID as an integer or None.
- Return type:
- get_ground_level_pressure()
Returns a list of ground level pressures for each forecast entry. Ground level pressure is typically measured in hPa (hectopascals).
Returns an empty list if the mode is ‘xml’ since ground level pressure is not available in those formats.
- get_humidity()
Returns a list of humidity values for each forecast entry. Humidity is typically measured as a percentage (0-100%).
- get_humidity_unit()
Returns the units of the humidity from the response data. The units are typically ‘percent’ for percentage.
Returns an empty list if the mode is ‘json’ since the unit is not available in that format.
- get_lastupdate()
Returns the last update time from the response data. The last update time is typically represented as a Unix timestamp (seconds since epoch).
Returns -1 if the mode is ‘json’ since last update time is not available in those formats.
- get_latitude()
Returns the latitude of the city from the response data. Latitude is typically a float representing the geographical coordinate.
- get_longitude()
Returns the longitude of the city from the response data. Longitude is typically a float representing the geographical coordinate.
- get_message()
Returns the message from the response data. The message is typically an integer representing the status of the response.
The message is an internal parameter.
Returns None if the mode is ‘xml’ since the message is not available in those formats.
- Return message:
Message as an integer or None.
- Return type:
- get_next_update()
Returns the next update time from the response data. The next update time is typically represented as a Unix timestamp (seconds since epoch).
Returns -1 if the mode is ‘json’ since next update time is not available in those formats.
- Return next_update:
Next update time as an integer (Unix timestamp).
- Return type:
- get_part_of_day()
Returns a list of part of day for each forecast entry. Part of day is typically represented as a string (n - night, d - day).
Returns an empty list if the mode is ‘xml’ since part of day is not available in those formats.
- get_pop()
Returns a list of probability of precipitation (POP) values for each forecast entry. The values of the parameter vary between 0 and 1, where 0 is equal to 0%, 1 is equal to 100%
- get_population()
Returns the population of the city from the response data. The population is typically an integer representing the number of inhabitants in the city.
Returns -1 if the mode is ‘xml’ since population is not available in those formats.
- Return population:
Population as an integer.
- Return type:
- get_pressure()
Returns a list of atmospheric pressures for each forecast entry. Pressure is typically measured in hPa (hectopascals).
- get_pressure_unit()
Returns the units of the atmospheric pressure from the response data. The units are typically ‘hPa’ (hectopascals).
Returns an empty list if the mode is ‘json’ since the unit is not available in that format.
- get_rain()
Returns a list of rain volume for each forecast entry. Rain volume is typically measured in millimeters (mm).
- get_sea_level_pressure()
Returns a list of sea level pressures for each forecast entry. Sea level pressure is typically measured in hPa (hectopascals).
Returns an empty list if the mode is ‘xml’ since sea level pressure is not available in those formats.
- get_snow()
Returns a list of snow volume for each forecast entry. Snow volume is typically measured in millimeters (mm).
- get_sunrise()
Returns the sunrise time from the response data. The sunrise time is typically represented as a Unix timestamp (seconds since epoch).
- Return sunrise:
Sunrise time as an integer (Unix timestamp) or in the ISO 8601 format.
- get_sunset()
Returns the sunset time from the response data. The sunset time is typically represented as a Unix timestamp (seconds since epoch).
- Return sunset:
Sunset time as an integer (Unix timestamp) or in the ISO 8601 format.
- get_temperature()
Returns a list of temperatures for each forecast entry.
- get_temperature_max()
Returns a list of maximum temperatures for each forecast entry. Maximum temperature is typically measured in degrees Celsius (°C) or Fahrenheit (°F).
- get_temperature_min()
Returns a list of minimum temperatures for each forecast entry. Minimum temperature is typically measured in degrees Celsius (°C) or Fahrenheit (°F).
- get_temperature_unit()
Returns the units of the temperature from the response data. The units are typically ‘Celsius’ for metric or ‘Fahrenheit’ for imperial.
Returns an empty list if the mode is ‘json’ since the unit is not available in that format.
- get_times()
Returns the timestamps of the forecast data from the response data. The timestamps are typically represented as a Unix timestamp (seconds since epoch).
Returns an empty list if the mode is ‘xml’ since the timestamp is not available in those formats.
- get_timezone()
Returns the timezone offset from the response data. The timezone offset is typically an integer representing the offset in seconds from UTC.
- Return timezone:
Timezone offset as an integer.
- Return type:
- get_visibility()
Returns a list of visibility values for each forecast entry. Visibility is typically measured in meters (m).
- get_weather_description()
Returns a list of weather condition descriptions for each forecast entry. Weather condition descriptions are typically strings providing more detailed information about the weather (e.g., ‘clear sky’, ‘few clouds’).
- get_weather_icon()
Returns a list of weather condition icons for each forecast entry. Weather condition icons are typically strings representing the icon code for the weather condition.
- get_weather_id()
Returns a list of weather condition IDs for each forecast entry. Weather condition IDs are typically integers representing different weather conditions.
- get_weather_main()
Returns a list of main weather conditions for each forecast entry. Main weather conditions are typically strings representing the general weather condition (e.g., ‘Clear’, ‘Clouds’, ‘Rain’).
Returns an empty list if the mode is ‘xml’ since main weather conditions are not available in those formats.
- get_wind_deg()
Returns a list of wind degrees for each forecast entry. Wind degrees are typically measured in degrees (0-360).
- get_wind_direction()
Returns a list of wind directions for each forecast entry. Wind direction is typically represented as a string (e.g., ‘N’, ‘NE’, ‘E’, etc.).
Returns an empty list if the mode is ‘json’ since wind direction is not available in those formats.
- get_wind_direction_full()
Returns a list of full wind directions for each forecast entry. Full wind direction is typically represented as a string (e.g., ‘North’, ‘Northeast’, ‘East’, etc.).
Returns an empty list if the mode is ‘json’ since full wind direction is not available in those formats.
- get_wind_gust()
Returns a list of wind gusts for each forecast entry. Wind gusts are typically measured in meters per second (m/s).
- get_wind_gust_unit()
Returns the units of the wind gust from the response data. The units are typically ‘m/s’ (meters per second).
Returns an empty list if the mode is ‘json’ since the unit is not available in that format.
- get_wind_speed()
Returns a list of wind speeds for each forecast entry. Wind speed is typically measured in meters per second (m/s).
- get_wind_speed_name()
Returns a list of wind speed names for each forecast entry. The wind speed name is typically a string representing the wind speed category (e.g., ‘calm’, ‘light breeze’).
Returns an empty list if the mode is ‘json’ since the name is not available in that format.
- get_wind_speed_unit()
Returns the units of the wind speed from the response data. The units are typically ‘m/s’ (meters per second).
Returns an empty list if the mode is ‘json’ since the unit is not available in that format.
- class openweatherwrap.core.GeocodingResponse(data)
Bases:
objectClass to handle the response data for geocoding information. It provides methods to extract various geocoding parameters from the response data.
- get_country()
Returns the country code from the response data. The country code is typically a string representing the ISO 3166-1 alpha-2 code of the country.
- get_latitude()
Returns the latitude of the location from the response data. Latitude is typically a float representing the geographical coordinate.
- get_local_names()
Returns a dictionary of local names for the location from the response data. Local names are typically represented as a dictionary with language codes as keys and names as values.
- get_longitude()
Returns the longitude of the location from the response data. Longitude is typically a float representing the geographical coordinate.
- get_name()
Returns the name of the location from the response data. The name is typically a string representing the name of the location.
- get_state()
Returns the state or region from the response data. The state is typically a string representing the name of the state or region.
- class openweatherwrap.core.OneCallAggregationResponse(data)
Bases:
objectA class to handle the aggregation response from the OpenWeather One Call API.
- get_cloud_cover_afternoon()
Returns a list of cloud cover values for the afternoon period of each daily forecast entry.
- Return cloud_cover_afternoon:
The cloud coverage.
- Return type:
- get_date()
Returns the date from the aggregation response data. Date is a string in the format ‘YYYY-MM-DD’.
- Return date:
Date as a string.
- Return type:
- get_humidity_afternoon()
Returns a list of humidity values for the afternoon period of each daily forecast entry.
- Return humidity_afternoon:
The humidity.
- Return type:
- get_latitude()
Returns the latitude from the aggregation response data. Latitude will be a value between -90 and 90.
- Return latitude:
Latitude as a float.
- Return type:
- get_longitude()
Returns the longitude from the aggregation response data. Longitude will be a value between -180 and 180.
- Return longitude:
Longitude as a float.
- Return type:
- get_pressure_afternoon()
Returns a list of atmospheric pressures for each daily forecast entry.
- Return pressure_afternoon:
The pressure for the afternoon.
- Return type:
- get_temperature_afternoon()
Returns a list of afternoon temperatures for each daily forecast entry.
- Return temperature_afternoon:
The temperature in the afternoon.
- Return type:
- get_temperature_evening()
Returns a list of evening temperatures for each daily forecast entry.
- Return temperature_evening:
The temperature in the evening.
- Return type:
- get_temperature_max()
Returns a list of maximum temperatures for each daily forecast entry.
- Return temperature_max:
The maximum themperature.
- Return type:
- get_temperature_min()
Returns a list of minimum temperatures for each daily forecast entry.
- Return temperature_min:
The minimum temperature.
- Return type:
- get_temperature_morning()
Returns a list of morning temperatures for each daily forecast entry.
- Return temperature_morning:
The temperature in the morning.
- Return type:
- get_temperature_night()
Returns a list of nighttime temperatures for each daily forecast entry.
- Return temperature_night:
The temperature at night.
- Return type:
- get_timezone()
Returns the timezone from the aggregation response data. Timezone is a string representing the timezone of the location. Example: ‘+00:00’
- Return timezone:
Timezone as a string.
- Return type:
- get_total_precipitation()
Returns a list of total precipitation values for each daily forecast entry.
- Return total_precipitation:
The total precipitation.
- Return type:
- get_units()
Returns the units used in the aggregation response data. Units can be ‘metric’, ‘imperial’, or ‘standard’.
- Return units:
Units as a string.
- Return type:
- get_wind_max_direction()
Returns a list of maximum wind directions for each daily forecast entry.
- Return wind_max_direction:
The maximum wind direction.
- Return type:
- class openweatherwrap.core.OneCallResponse(data)
Bases:
objectA class to handle the response from the OpenWeather One Call API.
- get_alerts()
Returns a list of alerts from the response data.
- Return alerts:
List of OpenWeatherAlert objects.
- Return type:
- get_current_clouds()
Returns the current cloudiness in % from the response data.
- get_current_dew_point()
Returns the current dew point from the response data.
- get_current_feels_like()
Returns the current feels-like temperature from the response data. Feels-like temperature is the perceived temperature, which may differ from the actual temperature due to factors like humidity and wind.
- get_current_humidity()
Returns the current humidity in % from the response data.
- get_current_pressure()
Returns the current atmospheric pressure from the response data. Pressure is measured in hPa (hectopascals).
- Return pressure:
Current pressure as an integer.
- Return type:
- get_current_rain()
Returns the current rain volume from the response data. Rain volume is typically measured in mm (millimeters).
- get_current_snow()
Returns the current snow volume from the response data. Snow volume is typically measured in mm (millimeters).
- get_current_sunrise()
Returns the sunrise time in seconds since the epoch from the response data. This is the time of sunrise for the current day.
- get_current_sunset()
Returns the sunset time in seconds since the epoch from the response data. This is the time of sunset for the current day.
- get_current_temp()
Returns the current temperature from the response data. Temperature is in Kelvin by default, but can be converted to Celsius or Fahrenheit as needed.
- get_current_time()
Returns the current time in seconds since the epoch from the response data. This is the time of the current weather data.
- get_current_uvi()
Returns the current UV index from the response data.
- get_current_visibility()
Returns the current visibility in km from the response data.
- get_current_weather_description()
Returns the current weather description from the response data.
- get_current_weather_icon()
Returns the current weather icon code from the response data.
- get_current_weather_id()
Returns the current weather condition ID from the response data.
- Return weather_id:
Weather condition ID as an integer.
- Return type:
- get_current_weather_main()
Returns the current weather main description from the response data.
- get_current_wind_deg()
Returns the current wind direction in degrees from the response data.
- get_current_wind_gust()
Returns the current wind gust speed from the response data.
- get_current_wind_speed()
Returns the current wind speed from the response data. Wind speed is typically measured in meters per second (m/s), but can be converted to miles per hour (mph).
- get_daily_clouds()
Returns a list of cloudiness values for each daily forecast entry.
- get_daily_dew_point()
Returns a list of dew point values for each daily forecast entry.
- get_daily_feels_like_day()
Returns a list of daytime feels-like temperatures for each daily forecast entry.
- get_daily_feels_like_eve()
Returns a list of evening feels-like temperatures for each daily forecast entry.
- get_daily_feels_like_morning()
Returns a list of morning feels-like temperatures for each daily forecast entry.
- get_daily_feels_like_night()
Returns a list of nighttime feels-like temperatures for each daily forecast entry.
- get_daily_humidity()
Returns a list of humidity values for each daily forecast entry.
- get_daily_moon_phase()
Returns a list of moon phase values for each daily forecast entry.
- get_daily_moonrise()
Returns a list of moonrise times for each daily forecast entry.
- get_daily_moonset()
Returns a list of moonset times for each daily forecast entry.
- get_daily_pop()
Returns a list of probability of precipitation values for each daily forecast entry.
- get_daily_pressure()
Returns a list of atmospheric pressures for each daily forecast entry.
- get_daily_rain()
Returns a list of rain volume values for each daily forecast entry.
- get_daily_snow()
Returns a list of snow volume values for each daily forecast entry.
- get_daily_summary()
Returns a list of summary strings for each daily forecast entry.
- get_daily_sunrise()
Returns a list of sunrise times for each daily forecast entry.
- get_daily_sunset()
Returns a list of sunset times for each daily forecast entry.
- get_daily_temp_day()
Returns a list of daytime temperatures for each daily forecast entry.
- get_daily_temp_eve()
Returns a list of evening temperatures for each daily forecast entry.
- get_daily_temp_max()
Returns a list of maximum temperatures for each daily forecast entry.
- get_daily_temp_min()
Returns a list of minimum temperatures for each daily forecast entry.
- get_daily_temp_morning()
Returns a list of morning temperatures for each daily forecast entry.
- get_daily_temp_night()
Returns a list of nighttime temperatures for each daily forecast entry.
- get_daily_times()
Returns a list of timestamps for each daily forecast entry.
- get_daily_uvi()
Returns a list of UV index values for each daily forecast entry.
- get_daily_weather_description()
Returns a list of weather descriptions for each daily forecast entry.
- get_daily_weather_icon()
Returns a list of weather icon codes for each daily forecast entry.
- get_daily_weather_id()
Returns a list of weather condition IDs for each daily forecast entry.
- get_daily_weather_main()
Returns a list of weather main descriptions for each daily forecast entry.
- get_daily_wind_deg()
Returns a list of wind direction values for each daily forecast entry.
- get_daily_wind_gust()
Returns a list of wind gust values for each daily forecast entry.
- get_daily_wind_speed()
Returns a list of wind speed values for each daily forecast entry.
- get_hourly_clouds()
Returns a list of cloudiness values for each hourly forecast entry.
- get_hourly_dew_point()
Returns a list of dew point values for each hourly forecast entry.
- get_hourly_feels_like()
Returns a list of feels-like temperatures for each hourly forecast entry.
- get_hourly_humidity()
Returns a list of humidity values for each hourly forecast entry.
- get_hourly_pop()
Returns a list of probability of precipitation values for each hourly forecast entry.
- get_hourly_pressure()
Returns a list of atmospheric pressures for each hourly forecast entry.
- get_hourly_rain()
Returns a list of rain volume values for each hourly forecast entry.
- get_hourly_snow()
Returns a list of snow volume values for each hourly forecast entry.
- get_hourly_temp()
Returns a list of temperatures for each hourly forecast entry.
- get_hourly_times()
Returns a list of timestamps for each hourly forecast entry.
- get_hourly_uvi()
Returns a list of UV index values for each hourly forecast entry.
- get_hourly_visibility()
Returns a list of visibility values for each hourly forecast entry.
- get_hourly_weather_description()
Returns a list of weather descriptions for each hourly forecast entry.
- get_hourly_weather_icon()
Returns a list of weather icon codes for each hourly forecast entry.
- get_hourly_weather_id()
Returns a list of weather condition IDs for each hourly forecast entry.
- get_hourly_weather_main()
Returns a list of weather main descriptions for each hourly forecast entry.
- get_hourly_wind_deg()
Returns a list of wind direction values for each hourly forecast entry.
- get_hourly_wind_gust()
Returns a list of wind gust values for each hourly forecast entry.
- get_hourly_wind_speed()
Returns a list of wind speed values for each hourly forecast entry.
- get_latitude()
Returns the latitude from the response data. Latitude will be a value between -90 and 90.
- Return latitude:
Latitude as a float.
- Return type:
- get_longitude()
Returns the longitude from the response data. Longitude will be a value between -180 and 180.
- Return longitude:
Longitude as a float.
- Return type:
- get_minutely_precipitation()
Returns a list of precipitation values for each minutely forecast entry.
- get_minutely_times()
Returns a list of timestamps for each minutely forecast entry.
- get_timezone()
Returns the timezone from the response data. Timezone is a string representing the timezone of the location. Example: ‘America/New_York’
- Return timezone:
Timezone as a string.
- Return type:
- class openweatherwrap.core.OneCallTimestampedResponse(data)
Bases:
objectA class to handle the timestamped response from the OpenWeather One Call API.
- get_clouds()
Returns the cloudiness from the response data.
- Returns:
The cloudiness as an integer.
- Return type:
- get_dew_point()
Returns the dew point from the response data.
- Returns:
The dew point as a float.
- Return type:
- get_feels_like()
Returns the feels-like temperature from the response data.
- Returns:
The feels-like temperature as a float.
- Return type:
- get_humidity()
Returns the humidity from the response data.
- Returns:
The humidity as an integer.
- Return type:
- get_latitude()
Returns the latitude of the location from the response data.
- Return latitude:
Latitude as a float.
- Return type:
- get_longitude()
Returns the longitude of the location from the response data.
- Return longitude:
Longitude as a float.
- Return type:
- get_pressure()
Returns the atmospheric pressure from the response data.
- Returns:
The atmospheric pressure as an integer.
- Return type:
- get_sunrise()
Returns the sunrise time from the response data.
- Returns:
The sunrise time as a timestamp.
- Return type:
- get_sunset()
Returns the sunset time from the response data.
- Returns:
The sunset time as a timestamp.
- Return type:
- get_temperature()
Returns the temperature from the response data.
- Returns:
The temperature as a float.
- Return type:
- get_time()
Returns the time of the response data.
- Returns:
The time of the response data as a timestamp.
- Return type:
- get_timezone()
Returns the timezone of the location from the response data.
- Return timezone:
Timezone as a string.
- Return type:
- get_timezone_offset()
Returns the timezone offset in seconds from the response data.
- Return timezone_offset:
Timezone offset as an integer.
- Return type:
- get_uvi()
Returns the UV index from the response data.
- Returns:
The UV index as a float.
- Return type:
- get_visibility()
Returns the visibility from the response data.
- Returns:
The visibility as an integer.
- Return type:
- get_weather_description()
Returns the weather description from the response data.
- Returns:
The weather description as a string or None.
- Return type:
str | None
- get_weather_icon()
Returns the weather icon code from the response data.
- Returns:
The weather icon code as a string or None.
- Return type:
str | None
- get_weather_id()
Returns the weather condition ID from the response data.
- Returns:
The weather condition ID as an integer.
- Return type:
- get_weather_main()
Returns the main weather description from the response data.
- Returns:
The main weather description as a string or None.
- Return type:
str | None
- get_wind_deg()
Returns the wind direction in degrees from the response data.
- Returns:
The wind direction as an integer.
- Return type:
- class openweatherwrap.core.OpenWeatherAlert(data)
Bases:
objectA class to represent an alert from the OpenWeather API.
- get_description()
Returns a description of the alert.
- get_end()
Returns the end time of the alert in Unix timestamp format.
- get_event()
Returns the event type of the alert.
- get_sender_name()
Returns the name of the sender of the alert.
- get_start()
Returns the start time of the alert in Unix timestamp format.