# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-pycountry VERSION= 26.2.16 KEYWORDS= python VARIANTS= v13 v14 SDESC[v13]= ISO country and language databases (3.13) SDESC[v14]= ISO country and language databases (3.14) HOMEPAGE= https://pypi.org/project/pycountry/ CONTACT= Python_Automaton[python@ironwolf.systems] DOWNLOAD_GROUPS= main SITES[main]= PYPIWHL/9c/42/7703bd45b62fecd44cd7d3495423097e2f7d28bc2e99e7c1af68892ab157 DISTFILE[1]= pycountry-26.2.16-py3-none-any.whl:main DIST_SUBDIR= python-src DF_INDEX= 1 SPKGS[v13]= single SPKGS[v14]= single OPTIONS_AVAILABLE= PY313 PY314 OPTIONS_STANDARD= none VOPTS[v13]= PY313=ON PY314=OFF VOPTS[v14]= PY313=OFF PY314=ON DISTNAME= pycountry-26.2.16.dist-info GENERATED= yes [PY313].USES_ON= python:v13,wheel [PY314].USES_ON= python:v14,wheel [FILE:3330:descriptions/desc.single] ########### pycountry ########### pycountry provides the ISO databases for the standards: - `639-3 `_ Languages - [3166] Codes for representation of names of countries and their subdivisions - `3166-1 `_ 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. *************** Contributions *************** The code lives in a [git repository on GitHub ], and issues must be reported in there as well. ************************ Countries (ISO 3166-1) ************************ 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='AW', alpha_3='ABW', flag='๐Ÿ‡ฆ๐Ÿ‡ผ', name='Aruba', numeric='533') 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', flag='๐Ÿ‡ฉ๐Ÿ‡ช', 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' There's also a "fuzzy" search to help people discover "proper" countries for names that might only actually be subdivisions. The fuzziness also includes normalizing unicode accents. There's also a bit of prioritization included to prefer matches on country names before subdivision names and have countries with more matches be listed before ones with fewer matches: .. code:: pycon >>> pycountry.countries.search_fuzzy('England') [Country(alpha_2='GB', alpha_3='GBR', flag='๐Ÿ‡ฌ๐Ÿ‡ง', name='United Kingdom', numeric='826', official_name='United Kingdom of Great Britain and Northern Ireland')] >>> pycountry.countries.search_fuzzy('Cote') [Country(alpha_2='CI', alpha_3='CIV', flag='๐Ÿ‡จ๐Ÿ‡ฎ', name="Cรดte d'Ivoire", numeric='384', official_name="Republic of Cรดte d'Ivoire"), Country(alpha_2='FR', alpha_3='FRA', flag='๐Ÿ‡ซ๐Ÿ‡ท', name='France', numeric='250', official_name='French Republic'), Country(alpha_2='HN', alpha_3='HND', flag='๐Ÿ‡ญ๐Ÿ‡ณ', name='Honduras', numeric='340', official_name='Republic of Honduras')] Attributes for the country class can be accessed using the __getattr__ method. If the requested attribute is a key for the [FILE:124:distinfo] 115c4baf7cceaa30f59a4694d79483c9167dbce7a9de4d3d571c5f3ea77c305a 8044600 python-src/pycountry-26.2.16-py3-none-any.whl