Registry / serialization / python-iso639

python-iso639

JSON →
library2026.7.23pypypi✓ verified 27d ago

python-iso639 provides a comprehensive and easy-to-use interface to ISO 639 language codes, including 639-1, 639-2, and 639-3, along with their names and associated information. It is actively maintained with frequent updates to the underlying ISO 639 data from SIL. The current version is 2026.1.31.

pip install python-iso639
INSTALL
IMPORT
SIG · PYTHON-ISO639
P
python-iso639
serializationpythonv2026.7.23
Install
1.6s avg
Import
864ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2026.7.23 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.924s · 18.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.804s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Language
from iso639 import Language
languages
from iso639 import languages

This quickstart demonstrates how to import the `Language` class and `languages` collection, query languages using ISO 639-1 and 639-3 codes, and search for languages by name with case-insensitivity.

from iso639 import Language, languages # Query a language by its ISO 639-1 code english_lang = Language.from_part1("en") print(f"639-1 'en' name: {english_lang.name}") # Query by ISO 639-3 code japanese_lang = Language.from_part3("jpn") print(f"639-3 'jpn' name: {japanese_lang.name}") # Get all languages print(f"Total languages in database: {len(languages)}") # Search languages by name (case-insensitive, strict_case=False) spanish_languages = languages.match("Spanish", strict_case=False) print("Matching 'Spanish' (case-insensitive):") for lang in spanish_languages: print(f"- {lang.name} ({lang.part1 if lang.part1 else lang.part3})")
Debug
Known issues
breakingThe `exact` keyword argument in `Language.match` was removed and replaced with `strict_case` in version 2025.11.11. The default behavior for case-insensitivity also changed.
fix
Replace `exact=True` with `strict_case=True` (or omit as it's the default). Replace `exact=False` with `strict_case=False`. Note that `strict_case=True` is the default, making matching case-sensitive by default.
affects: >=2025.11.11
gotchaThe default behavior for case-insensitivity in `Language.match` has changed multiple times. In 2025.2.18, case-insensitivity became the default. In 2025.11.11, it reverted to being opt-in (`strict_case=False`).
fix
Always explicitly set `strict_case=False` if you need case-insensitive matching, or `strict_case=True` if you need case-sensitive matching (which is the default from 2025.11.11 onwards).
affects: All versions, especially migrating between 2025.2.18 and 2025.11.11
breakingSupport for Python 3.9 was dropped in version 2025.11.11.
fix
Upgrade your Python environment to 3.10 or newer.
affects: >=2025.11.11
breakingSupport for Python 3.8 was dropped in version 2024.10.22.
fix
Upgrade your Python environment to 3.9 or newer (or 3.10+ for the latest library versions).
affects: >=2024.10.22
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'iso639'
The 'python-iso639' package has not been installed in the current Python environment.
fix
pip install python-iso639
AttributeError: 'NoneType' object has no attribute 'name'
This error occurs when a language lookup function (e.g., `iso639.Lang()`, `iso639.Language.from_part1()`) returns `None` because the specified language code was not found, and an attribute is subsequently accessed on this `None` object.
fix
Always check if the result of a language lookup is not `None` before attempting to access its attributes. Example: `lang = iso639.Lang(part1='xx'); if lang: print(lang.name)`
TypeError: Lang.__init__() takes 1 positional argument but X were given
`iso639.Lang()` requires language codes and other parameters to be passed as keyword arguments (e.g., `part1='en'`) rather than positional arguments.
fix
Pass language codes as keyword arguments to `iso639.Lang()`, specifying the part type (e.g., `iso639.Lang(part1='en')` or `iso639.Lang(part2b='eng')`).
AttributeError: module 'iso639' has no attribute 'all_languages'
An incorrect attribute name was used to access the collection of all language objects; the correct attribute is `iso639.languages`.
fix
Use `iso639.languages` to access the list or set of all language objects provided by the library.
Upgrade
Version history
2026.7.23latest on PyPI · released Jul 23, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Resources
python-iso639 — pip install python-iso639 · libregistry