IP2Location Python Library





4
Date Submitted Thu. Nov. 30th, 2006 11:36 PM
Revision 1 of 1
Beginner ivy7878
Tags address | addresses | country | IP | python
Comments 0 comments
This module is a Python Library to support all IP2Location™ database products. It has been optimized for speed and memory utilization. Developers can use the API to qeury all IP2Location™ binary databases for applications written in Python.

import IP2Location;

IP2LocObj = IP2Location.IP2Location();
IP2LocObj.open("data/IP-COUNTRY-SAMPLE.BIN");
rec = IP2LocObj.get_all("19.5.10.1");

print rec.country_short
print rec.country_long
print rec.region
print rec.city
print rec.isp
print rec.latitude
print rec.longitude
print rec.domain
print rec.zipcode
print rec.timezone
print rec.netspeed
 

Ivy TSI

Comments

There are currently no comments for this snippet.

Voting