Access info of the ISO 639-3 standard
This module provides an API to the information of the ISO-639-3 standard.
ISO-639-3 data is not distributed with this package. Instead, an ISO
instance can either
be passed the path to a local copy of the zipped ISO tables or it will download them from
https://iso639-3.sil.org/code_tables/download_tables
- class clldutils.iso_639_3.ISO(zippath=None)[source]
Provides access to the content of ISO 639-3’s downloadable code table.
An ISO instance maps three-letter codes to
Code
instances, and provides a couple of convenience methods.Usage:
>>> from clldutils.iso_639_3 import ISO >>> iso = ISO('iso-639-3_Code_Tables_20220311.zip') >>> iso.retirements[0] <ISO-639-3 [fri] Retirement/change> >>> iso.retirements[0].change_to [<ISO-639-3 [fry] Individual/Living>]
- Parameters:
zippath (
typing.Union
[str
,pathlib.Path
,None
]) –
- class clldutils.iso_639_3.Code(item, tablename, registry)[source]
Represents one ISO 639-3 code and its associated metadata.
- Variables:
code (str) – The three-letter code
name (str) – The language name
- property type: str
The type of the code formatted as pair “scope/type”
- property is_retired: bool
Flag signaling whether the code is retired.
- property is_local: bool
Flag signaling whether the code is in the private use area.