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

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


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-1.0.0.tar.gz (340.3 kB view details)

Uploaded Source

Built Distribution

country_list-1.0.0-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file country_list-1.0.0.tar.gz.

File metadata

  • Download URL: country_list-1.0.0.tar.gz
  • Upload date:
  • Size: 340.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.56.0 CPython/3.7.7

File hashes

Hashes for country_list-1.0.0.tar.gz
Algorithm Hash digest
SHA256 143497292775b4817cbb89bb70aa5de6d7501b034a0c4f3c1e2e2c06c5afcea1
MD5 12b4a3ea15b5994f394f8bc1bce06a2d
BLAKE2b-256 490fa28ffe0967d4f9c433a33ee016a546f3140b247774d75194ac070bf63ce8

See more details on using hashes here.

Provenance

File details

Details for the file country_list-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: country_list-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.56.0 CPython/3.7.7

File hashes

Hashes for country_list-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b73249e95fe42d2affd9ada40732898c8617ff635ff237be82e85aa4daea2345
MD5 84c8aed73ee79d4b7fff81b591a7652d
BLAKE2b-256 8034ab0f3fb3b11cb71ffd7b03582d6ad97596a8055183c5976f571938a47994

See more details on using hashes here.

Provenance

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