Since all the request are from web, it'd better to prepare a simple function to fetch the HTML/JSON from the site:
import urllib2, json
def fetchHTML(url):
req = urllib2.Request(url)
response=urllib2.urlopen(req)
return response.read()
Remember it is just for a quick and dirty approach. In real case we should handle exceptions (such as URL unreachable, network not found, etc)
Now we are ready to call the API. First of all we need to know the "id" of a City. http://openweathermap.org/data/2.1/find/name?q=<CITY>