Python wrapper for OpenWeather API
Project description
Sunnyside
Installation
pip3 install sunnyside
Getting Started
Python Version
Sunnyside only supports python 3.6+
Current Weather
https://openweathermap.org/current
Weather by city name
Note: Units are by default in Kelvin, to change units to imperial or celsius. This works for all Current Weather methods.
response = ref.get_current_weather_by_city_name("some_city_name_here","imperial")
import sunnyside
ref = sunnyside.CurrentWeather("YOUR-API-KEY-HERE") # Enter your api key here
response = ref.get_current_weather_by_city_name("city_name") # Enter your city name here
Weather by city id
ref.get_current_weather_by_city_id("city_id")
Weather by coordinates
ref.get_current_weather_by_geo_coords("lat","lon")
Weather by zip code
ref.get_current_weather_by_zip_code("zipcode")
5 Day Weather Forecast
https://openweathermap.org/forecast5
Weather by city name
Note: Units are by default in Kelvin, to change units to imperial or celsius. This works for all Current Weather methods.
response = ref.get_forecast_by_city_name("some_city_name_here","imperial")
import sunnyside
ref = sunnyside.CurrentWeather("YOUR-API-KEY-HERE") # Enter your api key here
response = ref.get_forecast_by_city_name("city_name") # Enter your city name here
Weather by city id
ref.get_forecast_by_city_id("city_id")
Weather by coordinates
ref.get_forecast_by_geo_coords("lat","lon")
Weather by zip code
ref.get_forecast_by_zip_code("zipcode")
Reference
https://openweathermap.org/api
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sunnyside-1.0.1.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for sunnyside-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec5f29b31f7b61d6ccb44982de3188d65dfba01968cf9afcb9004ea8a3b9b125 |
|
MD5 | 2fca276af12527b2b28695d5a745b7c3 |
|
BLAKE2b-256 | a2635c4fcf8c8c0be97a81cc56620e0cc5fca5e0c62d08aeb365e948ca3ab16e |