Code reference

International Organization for Standardization (ISO).

Submodules

cli

CLI for iso.

Functions

generate_all()

Generate codelists for all the databases in pycountry.DATABASE_INFO.

generate_codelists(standard_number)

Generate 1 or more Codelist with entries from ISO standard_number.

get_agencies()

Return the ISO Agency.

localize_all(value, translations, *[, ...])

Localize value in all languages available in translations.

transport_data.iso.generate_all() None[source]

Generate codelists for all the databases in pycountry.DATABASE_INFO.

transport_data.iso.generate_codelists(standard_number: str) None[source]

Generate 1 or more Codelist with entries from ISO standard_number.

Codes have:

  • IDs according to id_field.

  • An name attribute localized to all the languages present in the upstream database.

  • Annotations for all other fields in the upstream database.

Parameters:

standard_number – ISO standard number, e.g. “3166-2” for ISO 3166-2.

transport_data.iso.get_agencies()[source]

Return the ISO Agency.

transport_data.iso.localize_all(value: str, translations: Mapping[str, gettext.NullTranslations], *, default_locale='en') dict[str, str][source]

Localize value in all languages available in translations.