Build a client library in a language of your choice to access AccuWeather's Forecast API. The client library should be able to get the 1 day forecast when provided a zip code.
This is a client library to access the AccuWeather API written in Python 3. In order to use this library you must have Python 3 installed on your system.
- Ensure you have
Python 3installed on your system. - Install required package dependencies:
pip install requirements.txt
In order to use this application, follow the steps below. Directions may vary because these are customized for OS X:
- Obtain your
AccuweatherAPI key as an environment variable. You can find your API key on this page. - Open a
Pythonshell that can access this client library's folder. - Run the following commands to access the 1-day forecast for a location:
>>> from client import AccuweatherForecastAPI
>>> AccuweatherForecastAPI("<your api key>").get_forecast(13478)
'Expect showers this afternoon.'