This is a IP2Location Python library that enables the user to find the country, region or state, city, latitude and longitude, US ZIP code, time zone, Internet Service Provider (ISP) or company name, domain name, net speed, area code, weather station code, weather station name, mobile country code (MCC), mobile network code (MNC) and carrier brand, elevation, and usage type by IP address or hostname originates from. It contains a demo IP2Location IP-COUNTRY BIN database which consists of real data for IP address range 0.0.0.0 to 99.255.255.255. This database contains IP address blocks as key and countries as values. The paid version of IP2Location database covers all IP address range. In general, it is more complete, fast and accurate than using reverse DNS lookups. Developers can download other sample databases to evaluate other features such as country, region or state, city, latitude and longitude, US ZIP code, time zone, Internet Service Provider (ISP) or company name, domain name, net speed, area code, weather station code, weather station name, mobile country code (MCC), mobile network code (MNC) and carrier brand, elevation, and usage type using the same Python library.
For more details, please visit: http://www.ip2location.com/python.aspx http://www.ip2location.com/developers.aspx
This version also supports IP2Location IPv6.
- Python 2.2 and above
- Unzip the package.
- Execute python setup.py build
- Execute python setup.py install
Unix like platform: python sample_bsd.py Windows platform : python sample_win.py
wget http://www.ip2location.com/download/samples-db24.zip unzip samples-db24.zip
For support, please email support@ip2location.com.