Skip to content
This repository has been archived by the owner on Apr 10, 2018. It is now read-only.

region_name not available #82

Open
lithammer opened this issue Aug 5, 2015 · 1 comment
Open

region_name not available #82

lithammer opened this issue Aug 5, 2015 · 1 comment

Comments

@lithammer
Copy link

The official Python driver offers region_name which is the full name for what you call region_code, i.e. "Californa" instead of "CA".

>>> city.record_by_addr('64.233.161.99')
>>> {'area_code': 650,
     'city': 'Mountain View',
     'country_code': 'US',
     'country_code3': 'USA',
     'country_name': 'United States',
     'dma_code': 807,
     'latitude': 37.419200897216797,
     'longitude': -122.05740356445312,
     'metro_code': 807,
     'postal_code': '94043',
     'region': 'CA',
     'region_name': 'California',
     'time_zone': 'America/Los_Angeles'}

Is there any way to get this with pygeoip as well? Couldn't find anything except from the 0.3.0 changelog which hinted that you renamed region_name to region_code. But that's not the same.

@lithammer
Copy link
Author

Currently our workaround is to look it up ourselves in a local copy of http://www.maxmind.com/download/geoip/misc/region_codes.csv

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant