This is a IP2Location Python-C library that enables the user to find the country, region or state, city, latitude and longitude, 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, usage type, address type and IAB category by IP address or hostname originates from. The library used the IP2Location C Library to read the geo location information from IP2Location BIN data file.
Supported IPv4 and IPv6 address.
This library required the IP2Location C Library to work. You can install it from here.
- Python 2.7 and above
- IP2Location C Library.
- Install the IP2Location C Library.
- Download and unzip the package.
- Execute
python setup.py build
. - Execute
python setup.py install
.
Run python sample.py
in your terminal.
- Download free IP2Location LITE databases at https://lite.ip2location.com
- Download IP2Location Commercial databases at https://www.ip2location.com
- Use the IPv4 BIN file if you just need to query IPv4 addresses.
- Use the IPv6 BIN file if you need to query BOTH IPv4 and IPv6 addresses.
Email: support@ip2location.com. URL: https://www.ip2location.com