--- id: pycountry-convert version: "0.7.2" license: MIT License license_treatment: permissive maintenance: abandoned --- # pycountry-convert — Extension of Python package pycountry providing conversion functions. License: permissive · Maintenance: abandoned · Downloads: 484.2K/mo ## What it is and what it does pycountry-convert is an extension of the pycountry library that adds bidirectional conversion functions between country names, ISO country codes (alpha-2, alpha-3, and numeric formats), and continent codes. It uses country data derived from Wikipedia combined with pycountry's data source. The package provides functions to map countries with customizable name formatting (default, lowercase, or uppercase), convert between any pair of country identifiers, and look up continent codes from country codes. It has no runtime dependencies beyond pycountry and pprintpp, making it lightweight to install. Use it for: - Convert user-submitted country names to standardized ISO codes for database storage or API calls. - Determine a continent from a country code in geographic or regional analysis workflows. - Build lookup tables mapping country names to their ISO 3166-1 identifiers for data validation. - Normalize country data from multiple sources by converting between alpha-2, alpha-3, and numeric codes. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts between ISO country codes (alpha-2, alpha-3, numeric), country names, and continent codes using data from pycountry and Wikipedia. No. The package is abandoned (last release 2018-02-18) and has not been tested against modern Python versions. While the MIT license is permissive and installation is frictionless, the lack of maintenance means country data may be stale and bugs will not be fixed. Consider using an actively maintained alternative or integrating pycountry directly with your own conversion logic. ## Install pip install pycountry-convert uv add pycountry-convert poetry add pycountry-convert ## Installing pycountry-convert Before you install: Installation is straightforward with no compiled dependencies. However, the package has been abandoned since its latest release on 2018-02-18, so maintenance and security patches are not expected. License in practice: Licensed under MIT (permissive), so you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install pycountry-convert from pycountry_convert import country_alpha2_to_continent_code continent = country_alpha2_to_continent_code('US') Verify before relying: - Whether the package's Wikipedia-derived country data is kept current or reflects the state as of the last 2018 release. - Compatibility with modern Python versions beyond 3.6, given the abandonment status and lack of recent testing. - Whether country data changes since 2018 affect the accuracy of conversions for current use. ## Package facts - License: MIT License (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 484.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags country code conversion, ISO 3166 country lookup, country name to alpha-2 code, continent from country code, pycountry extension, country-data, iso-standards [View on SkillFed](https://skillfed.io/packages/pycountry-convert) · [View on PyPI](https://pypi.org/project/pycountry-convert/)