def geo(_file, _ip):
''' This function search the geolocation values of an IP address '''
try:
_geo = []
geoDb = pygeoip.GeoIP(_file)
ip_dictionary_values = geoDb.record_by_addr(_ip)
ip_list_values = ip_dictionary_values.items()
for item in ip_list_values:
_geo.append({item[0]:item[1]})
return _geo
except:
pass