py-ip2location

Simple python bindings for ip2location’s GeoLocation dataset, when stored locally in a database (postgresql and MySQL tested), returning the information either by field or as a dict.

Sample usage:
ipdb = ip2location(host="localhost", user = "ip", password = "password",
					database = "ip2location", database_type='mysql')
city = ipdb.city("192.168.0.1")
print ipdb.all("192.168.0.1")

Download:

py-ip2location-0.1.tgz