Skip to main content

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


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.1.tar.gz (7.6 MB view details)

Uploaded Source

File details

Details for the file pysyge-0.1.1.tar.gz.

File metadata

  • Download URL: pysyge-0.1.1.tar.gz
  • Upload date:
  • Size: 7.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pysyge-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0898732caad3d7581a8ca23dbd923cd520389aee3c0013c30376dbcab2e0a9a7
MD5 cf844b5d74a37aaa0579487c17b16a43
BLAKE2b-256 25bb8a7716a6586c66d35a57ada6d713c075153a9ca7ee1c1f5eedee1baedded

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page