Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Shell script and module for easy geoip lookups.

Project description

Travis-CI codecov Latest version

Dead simple geoip package. Pretty much just a wrapper around maxminddb that automatically downloads the geolite database for you. You can either do this manually using the ‘download_latest_database’ function or let the script do it automatically when it detects no database is installed.

Can be used as a package or standalone script.

Install

pip install simplegeoip

Usage

As a python package.

import simplegeoip

# Gets a dict with country/city information
simplegeoip.lookup('127.0.0.1')
# Downloads an updated database into simplegeoip's package directory
simplegeoip.download_latest_database()
# Tells you when the database was last updated by maxmind
simplegeoip.last_updated()
# Returns a maxminddb reader object with the database automatically downloaded.
simplegeoip.reader()

The same as above but as a standalone script

simplegeoip 8.8.8.8
simplegeoip update
simplegeoip info

Project details


Release history Release notifications

This version
History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

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
simplegeoip-0.1.5-py2.py3-none-any.whl (29.8 kB) Copy SHA256 hash SHA256 Wheel 3.5 Apr 4, 2017
simplegeoip-0.1.5.tar.gz (28.3 kB) Copy SHA256 hash SHA256 Source None Apr 4, 2017

Supported by

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