Skip to main content

Self-contained ISO 3166-1 country definitions.

Project description

Authors:

Mike Spindel

Version:
0.1

ISO 3166-1 defines two-letter, three-letter, and three-digit country codes. Python-iso3166 is a self-contained module that converts between these codes and the corresponding country name.

Installation

$ pip install iso3166

Usage

>>> from iso3166 import countries
>>>
>>> countries.get('us')
Country(name=u'United States', alpha2='US', alpha3='USA', numeric='840')
>>> countries.get('ala')
Country(name=u'\xc5land Islands', alpha2='AX', alpha3='ALA', numeric='248')
>>> countries.get(8)
Country(name=u'Albania', alpha2='AL', alpha3='ALB', numeric='008')

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

iso3166-0.1.tar.gz (6.5 kB view details)

Uploaded Source

File details

Details for the file iso3166-0.1.tar.gz.

File metadata

  • Download URL: iso3166-0.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for iso3166-0.1.tar.gz
Algorithm Hash digest
SHA256 0240faa848863b93fe1779cef635e098032a4520c4e0f4115469ac21fa9b2b7e
MD5 5704bbbb4dd6e692ab3bb43cdcd34f24
BLAKE2b-256 a9e3705ed1735c30dc97c6f4bf3693c3a52eb6cc5160c6e570a5bc5cad9aa167

See more details on using hashes here.

Supported by

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