API to access data from Sypex Geo IP database files from your Python code
Project description
http://github.com/idlesign/pysyge
What’s that
pysyge is an API to access data from Sypex Geo IP database files from your Python code.
For more information about Sypex Geo databases and their features please visit http://sypexgeo.net.
Quickstart
Download Geo IP database file from http://sypexgeo.net/ (example below uses SxGeoCity.dat file).
Application sample:
# Import all we need from pysyge module. from pysyge import GeoLocator, MODE_BATCH, MODE_MEMORY # Create GeoLocator object to access API from 'SxGeoCity.dat' using fast memory mode. geodata = GeoLocator('SxGeoCity.dat', MODE_BATCH | MODE_MEMORY) # Request geo information for 77.88.21.3 IP address. location = geodata.get_location('77.88.21.3', detailed=True) # Print out some lyrics. print('%s (%s) calling. All the circuits are busy.' % (location['city'], location['country_iso']))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pysyge-0.1.0.tar.gz
(8.2 kB
view details)
File details
Details for the file pysyge-0.1.0.tar.gz
.
File metadata
- Download URL: pysyge-0.1.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c262a85d910c3c8b333e9429878a05d31f3cace50f08f1ae4f8be33d6235587a |
|
MD5 | c607f7e823c7977d5082e00b3926ea1e |
|
BLAKE2b-256 | 9c8b55ea1b1ed8d1a3121e6d62e303d82998deb77bf53b60cbe457295bbef72f |