Skip to main content

Convert ip addresses to a country using ip2nation db in memory.

Project description

Geo IP

Provides a fast, seamless in memory ip to country functionality based on the ip2nation db.

from geoip import geoip
r = geoip.GeoIp()
#This prints : 'US'

print r.resolve("")
#This prints : {'country': 'Korea (South)', 'host_name': '', 'country_code': 'KR'}

#This prints : 'US'


pip install geoip2nation


* Data can be downloaded using the download method

* The load_memory method loads the ip2nation sql data file from disk into an in memory sqlite3 db



ip2nation home

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for geoip2nation, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size geoip2nation-0.1.2.tar.gz (362.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page