Skip to main content

This is an IP geolocation library that enables the user to find the country, region, city, latitude and longitude, ZIP code, time zone, ISP, domain name, area code, weather info, mobile info, elevation, usage type, address type and IAB category from an IP address. It supports both IPv4 and IPv6 lookup.

Project description

IP2Location Python Library

PyPI PyPI - Downloads PyPI - Python Version

This is a IP2Location Python 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.

This library reads geo-location information from the IP2Location BIN database file and supports lookup for both IPv4 and IPv6 addresses.

Developer Documentation

To learn more about installation, usage, and code examples, please visit the developer documentation at https://ip2location-python.readthedocs.io/en/latest/index.html.

IP2Location BIN Databases

To use this library, you must download the IP2Location BIN database.

IPv4 versus IPv6 BIN Database

Below are general guidelines for determining whether to use the IPv4 BIN database or the IPv6 BIN database.

  • Use the IPv4 BIN database if you just need to query for IPv4 addresses.
  • Use the IPv6 BIN database if you need to query for both IPv4 and IPv6 addresses.

SDK or Library for Other Programming Languages

To learn about other readily available SDKs or libraries for different programming languages, please visit https://www.ip2location.com/development-libraries.

Support

Email: support@ip2location.com

URL: https://www.ip2location.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ip2location-8.11.0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ip2location-8.11.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file ip2location-8.11.0.tar.gz.

File metadata

  • Download URL: ip2location-8.11.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for ip2location-8.11.0.tar.gz
Algorithm Hash digest
SHA256 444149a741f6575d7711cf5414cfb81f0c44f830e2e94ab968d74665f8baaa31
MD5 5498738099180f862d54309c859526fb
BLAKE2b-256 7af8b44e07221217f2ef3e1e141fd13fefb439e077696b6a33f3921b323807bc

See more details on using hashes here.

File details

Details for the file ip2location-8.11.0-py3-none-any.whl.

File metadata

  • Download URL: ip2location-8.11.0-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for ip2location-8.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cee21e91ccffbbc5486c588fac5ea5d210feb7e1754d17090e7c6ab358bab16a
MD5 fd55b53b7a570e387ae9f2ee838ee053
BLAKE2b-256 b33a60a919dc2b3a475472b57994234c26ca6a42bded7140de31e6cd695237cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page