I need to get driving time between two sets of coordinates using Python. The only wrappers for the Google Maps API I have been able to find either use Google Maps API V2 (deprec
Updated the Accepted Answer to include the API Key and use a string for the addresses.
import simplejson, urllib
KEY = "xxxxxxxxxxxxxx"
orig = "Street Address 1"
dest = "Street Address 2"
url = "https://maps.googleapis.com/maps/api/distancematrix/json?key={0}&origins={1}&destinations={2}&mode=driving&language=en-EN&sensor=false".format(KEY,str(orig),str(dest))
result= simplejson.load(urllib.urlopen(url))
#print(result)
driving_time = result['rows'][0]['elements'][0]['duration']['text']
print(driving_time)