Skip to main content

Get country code of IPv4/IPv6 address. Address lookup is done offline.

Project description


Get ISO country code of IPv4/IPv6 address. Address lookup is done locally.

License Version
Travis CI Coverage
AppVeyor Supported versions
Wheel Implementation
Status Downloads
Show your support


  • [x] No external API call
  • [x] No paid GeoIP service
  • [x] Thread-safe
  • [x] Offline

To learn about using IP addresses for geolocation, read the Wikipedia article to gain a basic understanding.


pip install IPToCC


from iptocc import get_country_code
country_code = get_country_code('<IPv4/IPv6 address>')





Project details

Download files

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

Files for iptocc, version 2.1.2
Filename, size File type Python version Upload date Hashes
Filename, size iptocc-2.1.2-py3-none-any.whl (6.9 MB) File type Wheel Python version py3 Upload date Hashes View
Filename, size iptocc-2.1.2.tar.gz (6.7 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page