worldip /

Filename Size Date modified Message
54 B
1.3 KB
352 B
336 B
44 B
741 B
742 B
1.9 KB
4.2 KB


Simple WSGI app that shows your IP and geolocation info.

Uses WorldIP database from


  1. Download (SQL-format DB) from
  2. Run ./ This will create worldip.db SQLite DB file. Alternatively run ./ to create tables in PostgreSQL database named worldip (the database must already exist before running this script).
  3. Set up to be served by mod_wsgi or uWSGI (or whatever you use for WSGI apps). You may need to install the dependencies (listed in requirements.txt pip requirements file) in virtualenv or somewhere in PYTHONPATH. By default it looks for SQLite DB, if you intend to use PostgreSQL, change DB URI at the end of the file.

API Usage

Human readable (text/plain MIME type) response:

$ curl

JSON response:

$ curl -H 'Accept: application/json'

YAML response (text/x-yaml MIME type is also accepted):

$ curl -H 'Accept: application/x-yaml'

JSONP response:

$ curl

CORS requests are supported as well.