Python Library

This module is a Python Library to support all IP2Location™ database products. It has been optimized for speed and memory utilization. Developers can use this API to query all IP2Location™ binary databases for applications written in Python.

Download IP2Location Python Library (997.02 kB) Version: 6.0.0


  1. Unzip the package.
  2. Execute python build
  3. Execute python install


Sample Codes
import IP2Location;

rec = IP2LocObj.get_all("");

print rec.country_short
print rec.country_long
print rec.region
print rec.isp
print rec.latitude
print rec.longitude
print rec.domain
print rec.zipcode
print rec.timezone
print rec.netspeed
print rec.idd_code
print rec.area_code
print rec.weather_code
print rec.weather_name
print rec.mcc
print rec.mnc
print rec.mobile_brand
print rec.elevation
print rec.usage_type


Sample Database (BIN)

Evaluation version of the database file having limited range of IP address information. You can query all IP addresses from to only.