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-iso639Verified import paths — ran on the pinned version, not inferred.
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.
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.
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).
Upgrade your Python environment to 3.10 or newer.
Upgrade your Python environment to 3.9 or newer (or 3.10+ for the latest library versions).
pip install python-iso639
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)`
Pass language codes as keyword arguments to `iso639.Lang()`, specifying the part type (e.g., `iso639.Lang(part1='en')` or `iso639.Lang(part2b='eng')`).
Use `iso639.languages` to access the list or set of all language objects provided by the library.
No dependency data recorded yet.