Provides a comprehensive list of countries with names and ISO 3166-1 codes in all languages. Version 1.1.0 supports Python >=3.8,<4.0. Low cadence.
pip install country-listNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Fetches country names and ISO codes for a given language code (e.g., 'en'). Returns a list of tuples (code, name).
Replace `countries()` with `countries_for_language('en')` or any desired language code.Always use valid ISO 639-1 codes. Refer to pycountry or a standard list.
Sort the list manually if order matters: sorted(countries_for_language('en'), key=lambda x: x[1])No dependency data recorded yet.