Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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.

```python
from geoip import geoip
r = geoip.GeoIp()
r.load_memory()
r.resolve("12.12.12.12").country_code
#This prints : 'US'

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

r.resolve2("12.12.12.12").country_code
#This prints : 'US'
```


Installation
=========

pip install geoip2nation

https://pypi.python.org/pypi/geoip2nation/

ip2nation
=========

* 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

license
========
MIT

Links
========

ip2nation home http://ip2nation.com/
Release History

Release History

This version
History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
geoip2nation-0.1.2.tar.gz (362.5 kB) Copy SHA256 Checksum SHA256 Source Oct 10, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting