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.0.tar.gz
(339.8 kB
view details)
Built Distribution
File details
Details for the file country_list-0.2.0.tar.gz
.
File metadata
- Download URL: country_list-0.2.0.tar.gz
- Upload date:
- Size: 339.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8cbbbe8b47fd8969a1fe802b863b1312653ec44944310d20f5034865d4dcdcb |
|
MD5 | 5dd925f122272a107dc599110759e00e |
|
BLAKE2b-256 | 576a1b769b241d6f3f7e6828becc98b031a564f0d7a517b935dea246a3c141a4 |
Provenance
File details
Details for the file country_list-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: country_list-0.2.0-py3-none-any.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62846508a62f966a9f5ad314e479e7dfc9fe3f8a307add402f2e8151a11385ac |
|
MD5 | 2bd689dddc00611dc6998d38d44bae2d |
|
BLAKE2b-256 | f8a74c0b5f85043e9fde2ab38b59a40c9f11059303faa6599b722c8c2dcea7db |