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

Flask-GeoIP ------------- Simple Flask extension for pygeoip.

Project Description
**Author:** Jacob Magnusson. [Follow me on Twitter](

## About

This is a simple Flask extension for pygeoip. Not yet thoroughly tested, but has been working great for me so far.

## Installation

Install using `pip`...

pip install Flask-GeoIP

...or clone the project from github.

git clone

## Configuration

The GeoIP file that you want to use needs to be set in your config:

GEOIP_FILEPATH = '/path/to/geoip.dat'

You can change the caching method (default is 'STANDARD') that is used
by pygeoip:


Then in the code you do:

from flask.ext.geoip import GeoIP
app = Flask(__name__)
geoip = GeoIP(app)
country = geoip.country_name_by_addr('')

Or if using a factory function for creating your app:

from flask.ext.geoip import GeoIP
geoip = GeoIP()
app = create_app('/path/to/')
country = geoip.country_name_by_addr('')

## Documentation

This readme.

## Credits

Thanks go out to [maxmind]( and [appliedsec]( for making these great libs.
Release History

Release History

This version
History Node


History Node


History Node


History Node


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
Flask_GeoIP-0.1.3-py2.py3-none-any.whl (5.3 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Oct 1, 2016
Flask-GeoIP-0.1.3.tar.gz (4.2 kB) Copy SHA256 Checksum SHA256 Source Oct 1, 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