Skip to main content

Convert country names and country codes

Project description

Python countrycode

Convert country names to and from 9 country code schemes.

A Python port of the countrycode package for R:

This is beta software.


Using pip

sudo pip install countrycode

Latest version from Gitub

git clone
cd pycountrycode
sudo python install


from countrycode import countrycode
countrycode(codes=['Algeria', 'United States'], origin='country_name', target='iso3c')
> ['DZA', 'USA']

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for countrycode, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size countrycode-0.2.tar.gz (12.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page