Yanked
This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 3.0.0 instead.
Reason given by maintainers: Missing "python_requires" in setup.py
- Version:
- 2.0.0
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
Country details
>>> 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')
Country lists and indexes
>>> from iso3166 import countries
>>> for c in countries:
print(c)
>>> Country(name=u'Afghanistan', alpha2='AF', alpha3='AFG', numeric='004')
Country(name='Åland Islands', alpha2='AX', alpha3='ALA', numeric='248')
Country(name='Albania', alpha2='AL', alpha3='ALB', numeric='008')
Country(name='Algeria', alpha2='DZ', alpha3='DZA', numeric='012')
>>> import iso3166
>>> iso3166.countries_by_name
>>> {'AFGHANISTAN': Country(name=u'Afghanistan', alpha2='AF', alpha3='AFG', numeric='004'),
'ALBANIA': Country(name=u'Albania', alpha2='AL', alpha3='ALB', numeric='008'),
'ALGERIA': Country(name=u'Algeria', alpha2='DZ', alpha3='DZA', numeric='012'),
...
>>> iso3166.countries_by_numeric
>>> {'004': Country(name='Afghanistan', alpha2='AF', alpha3='AFG', numeric='004'),
'008': Country(name='Albania', alpha2='AL', alpha3='ALB', numeric='008'),
'010': Country(name='Antarctica', alpha2='AQ', alpha3='ATA', numeric='010'),
...
>>> iso3166.countries_by_alpha2
>>> {'AD': Country(name='Andorra', alpha2='AD', alpha3='AND', numeric='020'),
'AE': Country(name='United Arab Emirates', alpha2='AE', alpha3='ARE', numeric='784'),
'AF': Country(name='Afghanistan', alpha2='AF', alpha3='AFG', numeric='004'),
...
>>> iso3166.countries_by_alpha3
>>> {'ABW': Country(name='Aruba', alpha2='AW', alpha3='ABW', numeric='533'),
'AFG': Country(name='Afghanistan', alpha2='AF', alpha3='AFG', numeric='004'),
'AGO': Country(name='Angola', alpha2='AO', alpha3='AGO', numeric='024'),
...
Release files for iso3166 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| iso3166-2.0.0.tar.gz | 10.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| iso3166-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.2 kB
Release files / iso3166-2.0.0.tar.gz
| Download URL | iso3166-2.0.0.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c629a6a7af98851869bcebdc5c8d19041a1f814be864352ba73a40d5cc891fb4
|
|
BLAKE2b-256 checksum How to use checksums |
6f622e73d92d085fd8e527e0d573635b443ac644243a0671040f73bab395d546
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.10
|
Release files / iso3166-2.0.0-py3-none-any.whl
| Download URL | iso3166-2.0.0-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1cda6ac0ec7df6ddd9cc6a24692adef45b946ed7be80f16379bd38404e2a57cb
|
|
BLAKE2b-256 checksum How to use checksums |
36d270bff701fa15caafcd719580794a76125283d12069c89f2352ab00ebf8a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.10
|