iso3166
Self-contained ISO 3166-1 country definitions.
Decision gist · record as of 2026-08-14
Yes. The package is lightweight, has no dependencies, and solves a straightforward problem with a stable, well-tested API. Dormant maintenance is not a concern for a data-reference module that changes only when ISO standards change. Use it when you need reliable ISO 3166-1 lookups without external API calls or heavy dependencies.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction install with no runtime dependencies.
- Maintenance is dormant—last release was in July 2022—but the package is marked Production/Stable and the repository remains active, suggesting it is feature-complete rather than abandoned.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
last release 2022-07-12 (1494 days) · last repo commit 2024-06-07 · 149 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,547,756 downloads/mo, #2,076 on PyPI
Alternatives
Verify before relying
pip install iso3166
from iso3166 import countries
country = countries.get('us')
print(country.name, country.alpha2, country.alpha3, country.numeric)- Whether the country data is kept current with official ISO 3166-1 updates given the dormant maintenance status.
- Performance characteristics when iterating over all countries or performing bulk lookups.
What it is and what it does
iso3166 is a self-contained lookup module for ISO 3166-1 country codes and names. It maintains a static dataset of all recognized countries and territories, allowing you to retrieve country information by alpha-2 code (e.g., 'US'), alpha-3 code (e.g., 'USA'), numeric code (e.g., '840'), or country name. The package provides both direct lookups via a countries object and indexed dictionaries for reverse lookups by name, alpha-2, alpha-3, or numeric code.
The module has no external dependencies and supports Python 3.6 and later. It includes type hints throughout the codebase and is marked Production/Stable. Updates reflect official ISO changes when they occur—for example, recent releases updated country names like Turkey to Türkiye and Macedonia to North Macedonia. The data is frozen at release time, so the package is best suited for applications that can tolerate a lag between official ISO updates and package releases.
Use it for
- Validate or normalize user-supplied country codes in web forms or APIs.
- Convert between different country code formats (e.g., from user input to a standard format for storage).
- Populate dropdown lists or reference data in applications that need to display all recognized countries.
- Enrich datasets by looking up country names from numeric or alphabetic codes.
- Build geolocation or localization features that need to map country codes to display names.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is lightweight, has no dependencies, and solves a straightforward problem with a stable, well-tested API. Dormant maintenance is not a concern for a data-reference module that changes only when ISO standards change. Use it when you need reliable ISO 3166-1 lookups without external API calls or heavy dependencies.
Install
iso3166 on PyPI
Before you install
Low friction install with no runtime dependencies. Maintenance is dormant—last release was in July 2022—but the package is marked Production/Stable and the repository remains active, suggesting it is feature-complete rather than abandoned.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install iso3166
from iso3166 import countries
country = countries.get('us')
print(country.name, country.alpha2, country.alpha3, country.numeric)
Verify before relying
- Whether the country data is kept current with official ISO 3166-1 updates given the dormant maintenance status.
- Performance characteristics when iterating over all countries or performing bulk lookups.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 1,494 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,547,756 / month, #2,076 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: iso3166-2.1.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “iso 3166 country codes”
- iso3166Converts between ISO 3166-1 country codes (two-letter, three-letter,…
- pycountryProvides programmatic access to ISO standard databases for countries,…
- pycountry-convertConverts between ISO country codes (alpha-2, alpha-3, numeric),…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also pycountry-convert · country-converter · country_list · isocodes · pycountry · phone-iso3166 · ip3country · django-countries · iso-639 · babelfish