'Get the geolocation info for an IP address. The GeoLite2 database must be installed.
Required parameters:
ip_address
Optional parameters:
None
Returns:
json:
{"continent": "North America",
"country": "United States",
"region": "California",
"city": "Mountain View",
"postal_code": "94035",
"timezone": "America/Los_Angeles",
"latitude": 37.386,
"longitude": -122.0838,
"accuracy": 1000
json:
{"error": "The address 127.0.0.1 is not in the database."'

@cherrypy.expose
@cherrypy.tools.json_out()
@requireAuth()
@addtoapi()
def get_geoip_lookup(self, ip_address='', **kwargs):

    geo_info = helpers.geoip_lookup(ip_address)
    if isinstance(geo_info, basestring):
        return {'error': geo_info}
    return geo_info
