isocodes
This project provides lists of various ISO standards (e.g. country, language, language scripts, and currency names) in one place
What it is and what it does
isocodes is a reference-data library that bundles ISO standard lists (countries, languages, currencies, scripts, subdivisions, and former countries) into a single Python package with modern access patterns. Instead of maintaining your own CSV or JSON files of country codes and names, you import isocodes and query structured data via dot notation (usa.name, usa.flag) or dictionary access, with fast lookup methods like find() for O(1) exact matches and search() for flexible filtering. The data originates from the Debian iso-codes project.
The library is zero-dependency and includes both a Python API and a command-line interface for quick lookups. It supports Python 3.9 through 3.13 and is actively maintained. Common use cases include populating country/language dropdowns, validating ISO codes in user input, and building geographic or linguistic metadata into applications.
Use it for:
- Populate country or language selection dropdowns in web forms with canonical names and codes
- Validate user-supplied ISO codes (alpha-2, alpha-3, numeric) against authoritative reference data
- Build geographic metadata (flags, official names, subdivisions) into location-aware applications
- Generate reports or exports in CSV/JSON with standardized currency or language codes
- Look up historical country names (e.g., 'Burma' → Myanmar) for data reconciliation
- CLI tool for quick ad-hoc ISO code lookups without writing Python code
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
isocodes provides programmatic access to ISO standard reference data (countries, languages, currencies, scripts, subdivisions) with dot-notation object access and fast lookup methods.
Yes. Zero dependencies, permissive license, active maintenance, no known vulnerabilities, and a clear use case for any application needing canonical ISO reference data. Install if you need to work with country codes, language codes, or related ISO standards; skip only if you maintain your own reference data or have very specific non-standard requirements.
Install
isocodes on PyPI
pip
pip install isocodesuv
uv add isocodespoetry
poetry add isocodesInstalling isocodes
Before you install
No runtime dependencies and low install friction. Active maintenance with recent release (2025-08-25) and a commit history through 2026-06-22.
License in practice
Licensed under LGPL 2.1 (permissive). You may use and modify the library freely; if you distribute modified versions, you must provide source code and license notice, but you can link it into proprietary applications.
Quickstart
pip install isocodes
from isocodes import countries
usa = countries.find(alpha_2="US")
print(usa.name) # 'United States'
print(usa.flag) # '🇺🇸'
Verify before relying
- Whether the data is updated regularly to reflect ISO standard changes and country name/code updates
- Performance characteristics of search() method on large result sets
- Completeness of coverage for all ISO 639-3 and ISO 639-5 language codes
Package facts
| License | GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 354 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 96,448/month — #13,212 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: isocodes-2025.8.25-py3-none-any.whl
Keywords: iso
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
babelfishBabelFish provides Python objects for…
permissive · top 15,000 on PyPI
pycountryProvides programmatic access to ISO standard…
copyleft · top 1,000 on PyPI
countryinfoCountryinfo provides a Python interface to…
permissive · top 15,000 on PyPI
iso3166Converts between ISO 3166-1 country codes…
permissive · top 5,000 on PyPI
country-converterConverts and matches country names across…
copyleft · top 5,000 on PyPI
geonamescacheProvides Python dictionaries of geographic data…
permissive · top 5,000 on PyPI
iso639-langResolves ISO 639 language codes and names to…
permissive · top 15,000 on PyPI
country_listProvides ISO 3166-1 country codes and names in…
permissive · top 15,000 on PyPI
iso-639Provides a Python interface to ISO 639 language…
agpl · top 15,000 on PyPI
python-iso639Maps ISO 639 language codes (639-1, 639-2,…
permissive · top 5,000 on PyPI