Skip to main content

Django GeoIP. Based on default DB or Redis.

Project description


.. image::
:alt: Build Status
.. image::
.. image::

Demo installation:

.. code-block:: bash

$ sudo apt-get install redis-server virtualenvwrapper
$ mkvirtualenv django-geoip-redis
$ git clone
$ cd django-geoip-redis
$ pip install -r requirements/package.txt
$ python develop
$ cd demo
$ pip install -r requirements.txt
$ python syncdb --noinput
$ python migrate
$ python loaddata ../fixtures/db.json
$ python sync_with_redis
$ python shell

.. code-block:: python

>>> from geoip import record_by_addr
>>> print (','.join(record_by_addr('')))

If you want use native db for local development,
you can add ``GEO_BACKEND = 'db'`` into

* MySQL(SSD): 728 rps
* SQLite(SSD): 46 rps
* Redis: 3548 rps

Tested on Ubuntu 12.04(x86_64), Django(1.6), uWSGI(1.0.3), Nginx(1.1.19) with Apache Benchmark:

.. code-block:: bash

$ ab -c 100 -n 1000 http://localhost/ip/

* Python: 2.6, 2.7, 3.3
* Django: 1.3.x, 1.4.x, 1.5.x, 1.6

.. image::
:alt: Bitdeli badge

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
django-geoip-redis-1.1.1.tar.gz (9.6 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page