
Generally, your API key should remain a secret, and you should avoid
sharing it (especially avoid publishing it in a book). To get your own API key, head over to www.openweathermap.org , and complete their sign-up progress by clicking the sign-up link at the top of the page. Fill out an e-mail address, username, and password. The registration page should look similar to the following screenshot:
- Retrieving your OpenWeatherMap API key
Once you've signed up, you'll be able to log into OpenWeatherMap. You can the find your personal API key by navigating to home. #openweathermap.org and scrolling down to the API key text box.
- Retrieving and parsing #JSON in Python
For retrieving and parsing JSON in Python, the first step is to add the three new
imports that we need to our headlines.py file:
-- import json
-- import urllib2
-- import urllib
0 Comments