pip3 install sunnyside
Sunnyside only supports python 3.6+
from sunnyside import Sunnyside
ref = Sunnyside("YOUR-API-KEY-HERE", "your-units-here") # Enter your api key here
https://openweathermap.org/current
Note: Units are by default in Kelvin, to change units to imperial or celsius.
weather = ref.current_weather()
response = weather.get_current_weather_by_city_name("city_name") # Enter your city name here
response = weather.get_current_weather_by_city_id("city_id")
response = weather.get_current_weather_by_geo_coords("lat","lon")
response = weather.get_current_weather_by_zip_code("zipcode")
https://openweathermap.org/forecast5
forecast = ref.five_day_forecast()
response = forecast.get_forecast_by_city_name("some_city_name_here")
response = forecast.get_forecast_by_city_id("city_id")
response = forecast.get_forecast_by_geo_coords("lat","lon")
response = forecast.get_forecast_by_zip_code("zipcode")
https://openweathermap.org/api/one-call-api
openweather = ref.one_call()
response = openweather.get_weather("33.441792","-94.037689")
https://openweathermap.org/api
https://openweathermap.org/current