geo-locator is an application that maps an IP address to a Location (latitude, longitude, country).
- API has just been added and updated to return json formatted results.
IP geolocation is inherently imprecise. Locations are often near the center of the population. Any location provided by a GeoIP2 database or web service should not be used to identify a particular address or household.
geo-locator uses a number of open source projects to work properly:
- geoIP - Provides the database reader needed to read the .mmdb binaries
- MaxMind - Provides the .mmdb binaries
- flask - a microframework for Python
- python - Python 2.6 or newer is required. Not tested on Python 3.
- virtualenv - a highly reccomended python virtual environment builder read more
geo-locator requires flask, virtualenv, and geoIP to work properly (all requirements should install if you follow the instructions below). To begin installation you must have Python 2.7.
$ pip install virtualenv
$ cd geo-locater
$ virtualenv project
New python executable in project/bin/python
Installing setuptools............................done.
Installing pip...................done.
note: you can create the virtualenv with whatever name you would like, but in doing so you must also change the shebang in the app.py file from #!../project/bin/python -> #!..//bin/python
$ project/bin/pip install -r requirements.txt
$ cd geo-locater
$ ./app.py
Navigate to your front facing IP http://<your-ip>:8080
- Implement the free MaxMind ISP
- moar things
This product includes GeoLite2 data created by MaxMind, available from MaxMind.