Skip to main content

List of all countries with names and ISO 3166-1 codes in all languages

Project description

https://img.shields.io/pypi/v/country_list.svg https://img.shields.io/travis/bulv1ne/country_list.svg Updates https://coveralls.io/repos/github/bulv1ne/country_list/badge.svg?branch=master https://img.shields.io/badge/code%20style-black-000000.svg

List of all countries with names and ISO 3166-1 codes in all languages and all data formats.

  • Free software: MIT license

Features

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.

Project details


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.1.3.tar.gz (321.7 kB view hashes)

Uploaded Source

Built Distribution

country_list-0.1.3-py3-none-any.whl (1.5 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page