Registry / data / iso-639

iso-639

JSON →
library0.4.5pypypiunverified

Python library for ISO 639 standard, providing mappings between language names, ISO 639-1 (alpha-2), ISO 639-2 (alpha-3), and ISO 639-3 codes. Version 0.4.5 is the latest release (as of 2025).

pip install iso-639
INSTALL
IMPORT
SIG · ISO-639
I
iso-639
datapythonv0.4.5
Install
2.5s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.4.5 · 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.000s · 19.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.5s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

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

Language
from iso639 import Language
from iso639 import Lang
Lang is not the main class; Language is the correct class.
iso639
import iso639
Importing the module directly gives access to custom exceptions like InvalidLanguageValue.

Instantiate a Language object with a name or code to access properties.

from iso639 import Language # Search by name (case-insensitive) lang = Language('English') print(lang.name) # 'English' print(lang.pt1) # 'en' print(lang.pt2b) # 'eng' print(lang.pt3) # 'eng' # Search by ISO 639-1 code lang2 = Language('fr') print(lang2.name) # 'French' # Iterate all languages for l in Language: print(l.name, l.pt1) break
Debug
Known issues
gotchaThe library raises InvalidLanguageValue (not ValueError) if the input is not found. Catch the custom exception.
fix
from iso639 import InvalidLanguageValue; try: Language('zzz') except InvalidLanguageValue: ...
affects: >=0.4.0
gotchaSome languages have multiple ISO 639-2 codes (B and T). Use .pt2b (bibliographic) and .pt2t (terminology) attributes.
fix
Use lang.pt2b for bibliographic code, lang.pt2t for terminology code.
affects: all
deprecatedThe old API with iso639.list_languages() is deprecated; use iteration over Language class.
fix
Replace iso639.list_languages() with [l for l in Language]
affects: <0.4.0
Upgrade
Version history
0.4.5latest on PyPI · released Apr 29, 2016
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
iso-639 — pip install iso-639 · libregistry