Skip to main content

Python wrapper for OpenWeather API

Project description

Sunnyside

GitHub release Python Version

Installation

pip3 install sunnyside

Getting Started

Python Version

Sunnyside only supports python 3.6+


from sunnyside import Sunnyside

ref = Sunnyside("YOUR-API-KEY-HERE", "your-units-here") # Enter your api key here

Current Weather

https://openweathermap.org/current

Weather by city name

Note: Units are by default in Kelvin, to change units to imperial or celsius.

weather = ref.currentWeather()
response = weather.get_current_weather_by_city_name("city_name") # Enter your city name here

Weather by city id

response = weather.get_current_weather_by_city_id("city_id")

Weather by coordinates

response = weather.get_current_weather_by_geo_coords("lat","lon")

Weather by zip code

response = weather.get_current_weather_by_zip_code("zipcode")

5 Day Weather Forecast

https://openweathermap.org/forecast5

Weather by city name

forecast = ref.fiveDayForecast()
response = forecast.get_forecast_by_city_name("some_city_name_here")

Weather by city id

response = forecast.get_forecast_by_city_id("city_id")

Weather by coordinates

response = forecast.get_forecast_by_geo_coords("lat","lon")

Weather by zip code

response = forecast.get_forecast_by_zip_code("zipcode")

Reference

https://openweathermap.org/api

https://openweathermap.org/current

https://openweathermap.org/forecast5

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.3.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sunnyside-1.0.3-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file sunnyside-1.0.3.tar.gz.

File metadata

  • Download URL: sunnyside-1.0.3.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for sunnyside-1.0.3.tar.gz
Algorithm Hash digest
SHA256 8c376fef50893ce416eb813b3556e1f8e5fe9ce3ced4dd6e9e7a9e8acd985264
MD5 7b580734ff7a2367babbad7ba3beecbe
BLAKE2b-256 805ad777e728b6d89d0dbb7e8be8d5e8d97478a11fd42d15ed78bd2960150929

See more details on using hashes here.

File details

Details for the file sunnyside-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: sunnyside-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for sunnyside-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d06794651ebfd6d0aa7764947e0577bd994b007cc0a475cafa615ef7cc9b2e56
MD5 979acd5f3ffbaa204ac6414b0a43ecbd
BLAKE2b-256 93bc0d7b29e63affc64e5432d3d1d113bd47078c4dee54b234a79f15d487ef8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page