Weather Forecast is a simple Python 3 console program to get Weather Forecast from DarkSky.net service API using any address as parameter.
Note: This program has been developed using Python 3.5.2. It's NOT compatible with Python 2.7 versions.
In order to get the weather forecast information from external services,you'll need to sign up and obtain your own API Key:
You must have to declare DS_API_KEY (DarkSky) and GM_API_KEY as environment variables. Note that GM_API_KEY is optional for development purposes, you don't need to declare.
$ export DS_API_KEY=your_api_key_obtained_from_darksky
$ export GM_API_KEY=your_api_key_obtained_from_google
Download the project from this repository:
$ git clone https://github.com/gonzaloplaza/python-weather-forecast.git my-project
You can change the main language for output information using ISO codes. By default, language variable (LANG) is "en".
You can change the default code for UNITS variable that is "si" (International System). Available codes are:
You can find a list of available languages and unit codes here: https://darksky.net/dev/docs/forecast
Once you have declared environment variables, you can execute the console program:
$ cd my-project
$ python3 forecast.py "Gran Via Street 28,Madrid"
And you'll get forecast information as output!:
Note: Forecast API is free until 1000 requests per day. For more information, check their FAQ: https://darksky.net/dev/docs/faq
Feel free to contribute to this project, pull requests and other improvements are welcome. If you have any ideas, just open an issue and tell me what you think, or send me an email to hello (at) ordermin.com
The code in this project is licensed under MIT LICENSE. Read file for more information.