python-pycountry
Port variant py310
Summary ISO country and language databases (3.10)
Package version 22.3.5
Homepage https://github.com/flyingcircusio/pycountry
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants py39
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 27 MAR 2022, 15:43:20 UTC
Port created 02 FEB 2018, 15:29:04 UTC
Subpackage Descriptions
single pycountry ========= .. image:g: https://travis-ci.org/flyingcircusio/pycountry.svg?branch=master pycountry provides the ISO databases for the standards: * `639-3 `_ Languages * [3166] Countries * `3166-3 `_ Deleted countries * `3166-2 `_ Subdivisions of countries * [4217] Currencies * [15924] Scripts The package includes a copy from Debian's `pkg-isocodes `_ and makes the data accessible through a Python API. Translation files for the various strings are included as well. Data update policy ------------------ No changes to the data will be accepted into pycountry. This is a pure wrapper around the ISO standard using the `pkg-isocodes` database from Debian *as is*. If you need changes to the political situation in the world, please talk to the ISO or Debian people, not me. Donations / Monetary Support ---------------------------- This is a small project that I maintain in my personal time. I am not interested in personal financial gain. However, if you would like to support the project then I would love if you would donate to [Feminist Frequency ] instead. Also, let the world know you did so, so that others can follow your path. Contributions ------------- The code lives in a [git repository on GitHub ], and issues must be reported in there as well. Countries (ISO 3166) -------------------- Countries are accessible through a database object that is already configured upon import of pycountry and works as an iterable: .. code:: pycon >>> import pycountry >>> len(pycountry.countries) 249 >>> list(pycountry.countries)[0] Country(alpha_2='AF', alpha_3='AFG', name='Afghanistan', numeric='004', official_name='Islamic Republic of Afghanistan') Specific countries can be looked up by their various codes and provide the information included in the standard as attributes: .. code:: pycon >>> germany = pycountry.countries.get(alpha_2='DE') >>> germany Country(alpha_2='DE', alpha_3='DEU', name='Germany', numeric='276', official_name='Federal Republic of Germany') >>> germany.alpha_2 'DE' >>> germany.alpha_3 'DEU' >>> germany.numeric '276' >>> germany.name 'Germany' >>> germany.official_name 'Federal Republic of Germany' The `historic_countries` database contains former countries that have been removed from the standard and are now included in ISO 3166-3, excluding existing ones: .. code:: pycon >>> ussr = pycountry.historic_countries.get(alpha_3='SUN') >>> ussr Country(alpha_3='SUN', alpha_4='SUHH', withdrawal_date='1992-08-30', name='USSR, Union of Soviet Socialist Republics', numeric='810') >>> ussr.alpha_4 'SUHH' >>> ussr.alpha_3 'SUN' >>> ussr.name 'USSR, Union of Soviet Socialist Republics'
Configuration Switches (platform-specific settings discarded)
PY310 ON Build using Python 3.10 PY39 OFF Build using Python 3.9
Package Dependencies by Type
Build (only) python-setuptools:single:py310
autoselect-python:single:standard
Build and Runtime python-setuptools:single:py310
python310:single:standard
Download groups
main mirror://PYPI/p/pycountry
Distribution File Information
b2163a246c585894d808f18783e19137cb70a0c18fb36748dc01fc6f109c1646 10141551 pycountry-22.3.5.tar.gz
Ports that require python-pycountry:py310
python-xml2rfc:py310 Request For Comment authoring with XML (3.10)