List of all countries with names and ISO 3166-1 codes in all languages
Project description
Features
List of all countries with names and ISO 3166-1 codes in all languages and all data formats.
Installation
Install country_list by running:
pip install country_list
Usage
Get all available languages:
from country_list import available_languages
for language in available_languages():
print(language)
Get country names in english and swedish:
>>> from country_list import countries_for_language
>>> # countries_for_language returns a list of tuples now, might be changed to an OrderedDict
>>> countries = dict(countries_for_language('en'))
>>> print(countries['GB'])
'United Kingdom'
>>> print(countries['SE'])
'Sweden'
>>> countries = dict(countries_for_language('sv'))
>>> print(countries['GB'])
'Storbritannien'
>>> print(countries['SE'])
'Sverige'
Credits
This package contains the data files from umpirsky/country-list.
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
License
The project is licensed under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
country_list-0.2.1.tar.gz
(339.5 kB
view hashes)
Built Distribution
Close
Hashes for country_list-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b849f59ce245bacf357c065507c9b8bf56ae3ecaa5f741886991f24345d7c6a6 |
|
MD5 | 22277871bca8fcd4bc36b2bfa23d9094 |
|
BLAKE2b-256 | fb1d7001939f7085679a2b87c1f705e125b0e069430345a0bc1d1af95c024909 |