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.

  • No external API call.

  • No paid GeoIP service.

Read The Free and Simple Way To Know Who Visits Your Site.

Features

  • Thread-safe

Install

pip install IPToCC

Usage

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

Sources

Libraries Used

Old implementations

  • SQLAlchemy + SQLite - Not thread-safe

  • UnQLite - large database file, problems with thread-safety

References

Author

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

IPToCC-1.1.1a0.tar.gz (2.0 MB view hashes)

Uploaded Source

Supported by

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