phone-iso3166
Phonenumber to Country (ISO 3166-1) mapping
What it is and what it does
Phone-ISO3166 is a lightweight, dependency-free library that converts international phone numbers (E.164 format) and mobile network codes (E.212 format) into ISO 3166-1 alpha-2 country codes. It also provides reverse lookups to find network operators by country. The package is designed for simple, direct mapping—it does not attempt to parse or validate phone numbers in various formats; it assumes input is already in a standardized form.
The library is useful when you need to determine a phone number's country of origin or find which mobile operator serves a given network code. It works by looking up the phone number prefix or network code pair against built-in reference tables. For fuzzy or locale-specific phone number parsing, the description suggests pairing it with external packages like phonenumbers or pycountry.
Use it for:
- Determine the country of origin for an international phone number in E.164 format.
- Look up the mobile network operator name and country for a given MCC (mobile country code) and MNC (mobile network code) pair.
- Reverse-lookup all mobile operators in a specific country by ISO country code.
- Enrich phone number data with country information for analytics or routing workflows.
- Validate or categorize incoming calls by their country of origin.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Maps international phone numbers and mobile network codes to ISO 3166-1 alpha-2 country codes, with optional lookup of network operator names.
No. The package is abandoned (no maintenance for 1457 days) with outdated Python classifiers and an unverified claim of Python 3.6+ support. While it has no dependencies and a permissive license, the stale reference data and lack of maintenance make it risky for production use. For active alternatives or a maintained fork, check the repository or consider phonenumbers + pycountry.
Install
phone-iso3166 on PyPI
pip
pip install phone-iso3166uv
uv add phone-iso3166poetry
poetry add phone-iso3166Installing phone-iso3166
Before you install
Low install friction with no runtime dependencies. However, the package is abandoned—last release was 1457 days ago with no maintenance activity. The classifiers list Python 2.7 and 3.3–3.5, which are all end-of-life; current Python support is unspecified.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely with minimal restrictions, provided you retain the license notice.
Quickstart
pip install phone-iso3166
from phone_iso3166.country import phone_country
phone_country('+1 202-456-1111') # Returns 'US'
from phone_iso3166.network import network
network(238, 1) # Returns ('DK', 'TDC Mobil')
The package declares support for Python 3.6+ in its description, but classifiers only list up to 3.5; actual compatibility with modern Python versions is unverified.
Verify before relying
- Whether the package actually works on Python 3.6+ and PyPy 3.6+ as claimed in the description, given the outdated classifiers.
- Whether the phone number and network code databases are current or stale after 1457 days without maintenance.
- Whether there are known issues or breaking changes in the latest release that the abandoned status might mask.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,457 days since the last release |
| First released | |
| Downloads | 126,879/month — #11,759 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: phone_iso3166-0.4.1-py3-none-any.whl
Keywords: phone, country, mobile, iso3166, e164, e212, countrycode, phonenumber
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
iso18245Provides lookup access to ISO 18245 Merchant…
permissive · top 15,000 on PyPI
phonenumbersParse, validate, format, and analyze…
permissive · top 1,000 on PyPI
phonenumbersliteParses, validates, formats, and analyzes…
permissive · top 5,000 on PyPI
country_listProvides ISO 3166-1 country codes and names in…
permissive · top 15,000 on PyPI
pycountry-convertConverts between ISO country codes (alpha-2,…
permissive · top 15,000 on PyPI
iso3166Converts between ISO 3166-1 country codes…
permissive · top 5,000 on PyPI
pycountryProvides programmatic access to ISO standard…
copyleft · top 1,000 on PyPI
django-phonenumber-fieldProvides a Django model field for storing,…
permissive · top 5,000 on PyPI
django-phonenumbersProvides a Django model field and form field…
permissive · top 15,000 on PyPI
IP2LocationLooks up geolocation data (country, region,…
permissive · top 15,000 on PyPI