Modules Provided

Python library for using Google Geocoding API V3.

class ggeocoder.Geocoder(client_id=None, private_key=None)[source]

Interface for interacting with Google’s Geocoding V3’s API.

If you have a Google Maps Premier account, you can supply your client_id and private_key and the Geocoder will make the request with a properly signed url

geocode(address, **params)[source]
Params may be any valid parameter accepted by Google’s API.
reverse_geocode(lat, lng, **params)[source]
Params may be any valid parameter accepted by Google’s API.
class ggeocoder.GeoResult(data)[source]

Represents the data for a single result returned by the google maps api. Allows you to access the data from the response using attributes instead of diving deep into the returned dictionary structure.

You can create aliases for the default ‘address_components’ of the response by settings the attr_mapping field to a dict of your mapping.:

attr_mapping = {'state': 'administrative_area_level_1'}

returns lat, lng coordinates as float types


returns fully formatted address result.


returns True when geocode result is a street address, False if not


Returns the raw dictionary object that the maps api returned for this single result.

exception ggeocoder.GeocodeError(status, url=None, response=None)[source]

Base class for errors in the ggeocoder module.

Methods of the Geocoder raise this when the Google Maps API returns a status of anything other than ‘OK’.

See for status codes and their meanings.

Indices and tables

Project Versions

Table Of Contents

Next topic


This Page