🌐
PyPI
pypi.org › project › pycountry
pycountry · PyPI
>>> 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'
      » pip install pycountry
    
Published   Feb 17, 2026
Version   26.2.16
🌐
Parseltongue
parseltongue.co.in › exploring-countries-with-the-pycountry-module-in-python
ParselTongue - Exploring Countries with the pycountry Module in Python
September 1, 2023 - import pycountry country_name = "India" country = pycountry.countries.get(name=country_name) print(country)
🌐
Medium
medium.com › @HeCanThink › pycountry-your-passport-to-iso-country-codes-names-and-more-2c39ef6668c0
PyCountry: Your Passport to ISO Country Codes, Names and More 🛂 | by Manoj Das | Medium
August 11, 2023 - What is pycountry? Access ISO databases for the standards Languages, Countries, Deleted countries, Subdivisions of countries, Currencies…
🌐
Openbase
openbase.com › python › pycountry › documentation
pycountry: Documentation | Openbase
pycountry docs, getting started, code examples, API reference and more
🌐
Anaconda.org
anaconda.org › conda-forge › pycountry
pycountry - conda-forge | Anaconda.org
GitHub Repository https://github.com/flyingcircusio/pycountry · Documentation https://pypi.org/project/pycountry/
🌐
GitHub
github.com › pycountry › pycountry
GitHub - pycountry/pycountry: A Python library to access ISO country, subdivision, language, currency and script definitions and their translations. · GitHub
A Python library to access ISO country, subdivision, language, currency and script definitions and their translations. - pycountry/pycountry
Starred by 964 users
Forked by 140 users
Languages   Python 90.8% | Makefile 8.9% | Nix 0.3%
🌐
PyTutorial
pytutorial.com › python-pycountry-understand-how-to-use-pycountry
PyTutorial | Python-pycountry | Understand How to Use pycountry
November 30, 2022 - pycountry is a python library that provides the ISO databases for the standards: Languages Countries Deleted countries Subdivisions of countries Currencies Scri
🌐
Messageix
docs.messageix.org › projects › models › en › latest › _modules › message_ix_models › util › pycountry.html
message_ix_models.util.pycountry — message-ix-models documentation
Returns ------- str or None """ from pycountry import countries, historic_countries # Maybe map a known, non-standard value to a standard value name = COUNTRY_NAME.get(name, name) # Use pycountry's built-in, case-insensitive lookup on all fields including name, # official_name, and common_name for db in (countries, historic_countries): try: return db.lookup(name).alpha_3 except LookupError: continue # Not found in `db`, e.g.
🌐
GitHub
github.com › pycountry
pycountry · GitHub
pycountry has one repository available. Follow their code on GitHub.
Find elsewhere
🌐
GitHub
github.com › PEAT-AI › pycountry
GitHub - PEAT-AI/pycountry
Countries (ISO 3166) ==================== Countries are accessible through a database object that is already configured upon import of pycountry and works as an iterable: >>> 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: >>> germany = pycountry.countries.get(alpha_2='DE') >>> germany Country(alpha_2='DE', alpha_3=
Author   PEAT-AI
🌐
CloudDefense.ai
clouddefense.ai › code › python › example › pycountry
Top 10 Examples of <!-- -->pycountry<!-- --> code in Python | CloudDefense.AI
def __determine_iso_639_3_key(): """ Determine the key needed for accessing ISO 639-3 language codes using pycountry. """ # Different version of pycountry seem to use different keys.
🌐
Snyk
snyk.io › advisor › pycountry › functions › pycountry.countries.get
How to use the pycountry.countries.get function in pycountry | Snyk
if airport_type != 'large_airport' and airport_type != 'small_airport' and airport_type != 'medium_airport': continue airport_type = airport_type.split("_")[0] airport_name = row['name'].strip() airport_coords = { 'lat': float(row['latitude_deg']), 'lon': float(row['longitude_deg']) } airport_city = row['municipality'].strip() airport_url = row['home_link'].strip() airport_wiki = row['wikipedia_link'].strip() airport_icao = row['ident'].upper().strip() # Add a '.' after single uppercase letters airport_name = re.sub( r"\b([A-Z])(?![\w\-\.])", r"\1.", airport_name) country_iso_code = row['iso_c
🌐
Iiasa
docs.ece.iiasa.ac.at › standards › countries.html
A common list of country names — ece-docs documentation
The nomenclature package (read the docs) builds on the pycountry package to provide a standardized list of country names based on the ISO 3166-1 standard.
🌐
Snyk
snyk.io › advisor › pycountry › functions › pycountry.languages
How to use the pycountry.languages function in pycountry | Snyk
rlz_pointer = 8 # Examples of longer RLZ values (2- and 5-char lang codes): # 1C1CHBF_en-GBGB901GB901 # 1C1GCEU_enUS820US820 if len(rlz_string) >= 11: # If a dash is in this position, it means it is a 5 char lang code, not the 2 char code if rlz_string[10] == '-': language_code = rlz_string[rlz_pointer:rlz_pointer+5] rlz_pointer += 5 # langcodes was having install issues on macOS; not using it for now in # order to not complicate Unfurl's install. Pycountry's languages isn't # as good (only alpha_2 and alpha_3) but better than nothing for now.
🌐
GitHub
github.com › pycountry › pycountry › issues
Issues · pycountry/pycountry
A Python library to access ISO country, subdivision, language, currency and script definitions and their translations. - Issues · pycountry/pycountry
Author   pycountry
🌐
GitHub
github.com › koldakov › pycountries
GitHub - koldakov/pycountries: Python library to access ISO country and currency standards. · GitHub
from decimal import Decimal from fastapi import FastAPI from pycountries import Country, Currency, Language from pydantic import BaseModel, model_validator app = FastAPI() class IndexRequest(BaseModel): country: Country currency: Currency amount: Decimal language: Language @model_validator(mode="after") def validate_amount(self) -> "IndexRequest": # TODO: Keep in mind, you need to handle exceptions raised by clean_amount method, # otherwise Internal Server Error will be raised.
Author   koldakov