dkoug Blog

Python3 reverse geocoding with google maps

Python -- Posted on Oct. 27, 2018

Python3 reverse geocoding with google maps

1
2
3
4
5
6
7
8
import json
import pprint
from pygeocoder import Geocoder
business_geocoder = Geocoder(api_key='my_google_api_key')
results = business_geocoder.geocode("address")
json_result = json.dumps(results.__dict__)
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(json_result)