Skip to content
Python library for Telize JSON IP and GeoIP REST API https://pypi.python.org/pypi/lizepy
Python Makefile
Find file
Latest commit 874305d @alexandrevicenzi Update README.md
Failed to load latest commit information.
lizepy Code refactor.
tests Fix missing file.
.gitignore Initial commit
.travis.yml Remove iptools dependency.
LICENSE Initial commit
Makefile Remove iptools dependency.
README.md Update README.md
setup.py Code refactor.

README.md

IMPORTANT INFORMATION

The public API of Telize will permanently shut down on November 15th, 2015. More information can be found here.

This project is no longer useful.

LizePy Build Status Coverage Status

Python lib for Telize JSON IP and GeoIP REST API

Requirements

Python 2.6 or later

Install

pip install lizepy

Usage

import lizepy

Getting your IP

ip = lizepy.get_ip()
print(ip)
>>> '0.0.0.0'

Getting GeoIP data

geoip = lizepy.get_geoip('8.8.8.8') or lizepy.get_geoip()

# Return None if the field is not present.

geoip.ip or geoip['ip']
geoip.country_code or geoip['country_code']
geoip.country_code3 or geoip['country_code3']
geoip.country or geoip['country']
geoip.region_code or geoip['region_code']
geoip.region or geoip['region']
geoip.city or geoip['city']
geoip.postal_code or geoip['postal_code']
geoip.continent_code or geoip['continent_code']
geoip.latitude or geoip['latitude']
geoip.longitude or geoip['longitude']
geoip.dma_code or geoip['dma_code']
geoip.area_code or geoip['area_code']
geoip.asn or geoip['asn']
geoip.isp or geoip['isp']
geoip.timezone or geoip['timezone']
Something went wrong with that request. Please try again.