Shell script and module for easy geoip lookups.
Project description
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size simplegeoip-0.1.5-py2.py3-none-any.whl (29.8 kB) | File type Wheel | Python version 3.5 | Upload date | Hashes View |
Filename, size simplegeoip-0.1.5.tar.gz (28.3 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for simplegeoip-0.1.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10a7f439cb875424845cb6caff88b9b8c22649649f6738ccf3b1321af68c50b3 |
|
MD5 | 70730a8afcbb11e1d316bde94af7e10c |
|
BLAKE2-256 | dec8f62b0442fd25da9030ed8e4bc90da8d9af2a997b4bed22529377f1160877 |