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.10.5.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

IP2Location-8.10.5-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ip2location-8.10.5.tar.gz
Algorithm Hash digest
SHA256 e26bdd214be15a41030f4e7e6771df6ccbc75d743c8853933252369993a6368b
MD5 303a53966cb51bfd31e9421caa4fe1b7
BLAKE2b-256 26d16c8d2e3e0076412186827eae5722f9eddb3d7a9bac1c906f1ee00182ff21

See more details on using hashes here.

File details

Details for the file IP2Location-8.10.5-py3-none-any.whl.

File metadata

  • Download URL: IP2Location-8.10.5-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for IP2Location-8.10.5-py3-none-any.whl
Algorithm Hash digest
SHA256 eb7e2a54d168a2f082927ca71e166e5c767d48a6c04851e3230cddebc4d34c79
MD5 bb0e0ad1b8503692632d7e5c59ed9520
BLAKE2b-256 f83283d9735da14416b48e571bfc624823e5b29b36384a2f5f2235c79b21d4ea

See more details on using hashes here.

Supported by

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