Welcome to PyCountryCode's documentation!
What it is? I have always loved knowing stuff. I love knowledge, it is my first love before anything else. In every kind of setup I find myself in I am always participating because I almost always have an idea about most things. This love of knowledge also made it easy for me to know more country telephone codes.
However, the truth is I couldn't cram them all the country codes and retrieve them from my mind every time it became necessary. I knew by heart those of the most popular countries that includes Russia (+7), UK (+44), USA (+1), Australia (+61) and of course Zimbabwe amongst many others.
Why? Someone wanted to know what code +52 was for which country, I didn't know, I was embarrassed at myself. I challenged myself by writing this package so I and anyone else can use to get the country calling code of any country and also to get a country after passing in a calling code you know but are not sure about the country of origin.
Inspiration I wanted to write something that others could find useful.
Installation pip install pycountrycode
Importing the 'getCode' function from pycountrycode.pycountrycode import getCode
- getCode('Zimbabwe')
- '+263'
- getCode('New Zealand')
- '+64'
- getCode('Peru')
- '+51'
- getCode('Madagascar')
- '+261'
- getCode('Russia')
- '+7'
- getCode('Australia')
- '+61'
- getCode('Israel')
- '+972'
- getCode('Male')
- 'Undefined country'
importing the 'getCountry' function. from pycountrycode.countrycode import getCountry
- getCountry('+52')
- 'Mexico'
- getCountry('+56')
- 'Easter Island'
- getCountry('+1')
- 'United States of America'
- getCountry('+7')
- 'Russia'
- getCountry('+44')
- 'Britain'
- getCountry('+86')
- 'China'
- getCountry('+3')
- 'Undefined country code'
- getCountry('+2')
- 'Undefined country code'
- getCountry('+5')
- 'Undefined country code'
Metadata
Release files for pycountrycode 1.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pycountrycode-1.1.5.tar.gz | 7.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pycountrycode-1.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.7 kB
Release files / pycountrycode-1.1.5.tar.gz
| Download URL | pycountrycode-1.1.5.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6466d5d12baef14cfe02f3afd23896a204986fa44c9574bd29d7d2ab84828571
|
|
BLAKE2b-256 checksum How to use checksums |
ad9d53f84a044bab1bb96141500cebccf5a5c855f6fccbd9cf6d76e53dda8350
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Release files / pycountrycode-1.1.5-py3-none-any.whl
| Download URL | pycountrycode-1.1.5-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db6e17ee1a3aee7af3d8db1ad3fa733d8fb111ae9635a13770f2f53663b7f014
|
|
BLAKE2b-256 checksum How to use checksums |
f0ce736f6d799a4c3f9b0d292e642c2eacfaa2643d4cffecdae5f71fc6d1cc24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|