Skip to content
This repository was archived by the owner on Apr 17, 2020. It is now read-only.

microparts/darksky-sdk-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DarkSky CircleCI

https://blog.darksky.net/dark-sky-has-a-new-home/

The API will continue to function through the end of 2021. Then shutdowns.


This library for the Dark Sky API provides access to detailed weather information from around the globe.

Installation

pip3 install darksky_sdk_python

Get started

Before you start using this library, you need to get your API key here.

All classes are fully annotated, source code it's your best doc : )

from darksky.api import DarkSky
from darksky.types import languages, units, weather


API_KEY = '0123456789abcdef9876543210fedcba'

darksky = DarkSky(API_KEY)

latitude = 42.3601
longitude = -71.0589
forecast = darksky.get_forecast(
    latitude, longitude,
    extend=False, # default `False`
    lang=languages.ENGLISH, # default `ENGLISH`
    units=units.AUTO, # default `auto`
    exclude=[weather.MINUTELY, weather.ALERTS] # default `[]`
)

forecast.latitude # 42.3601
forecast.longitude # -71.0589
forecast.timezone # timezone for coordinates. For exmaple: `America/New_York`

forecast.currently # CurrentlyForecast. Can be finded at darksky/forecast.py
forecast.minutely # MinutelyForecast. Can be finded at darksky/forecast.py
forecast.hourly # HourlyForecast. Can be finded at darksky/forecast.py
forecast.daily # DailyForecast. Can be finded at darksky/forecast.py
forecast.alerts # [Alert]. Can be finded at darksky/forecast.py

Contact us.

If you have any issues or questions regarding the library, you are welcome to create an issue, or You can write an Email to detrous@protonmail.com

License.

Library is released under the GNU General Public License.

About

This library for the Dark Sky API provides access to detailed weather information from around the globe

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages