Skip to main content

A neat country call code retriever

Project description

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 finf 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 everytime 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 'code' function from pycountrycode.pycountrycode import code

  • code('Zimbabwe')
  • '+263'
  • code('New Zealand')
  • '+64'
  • code('Peru')
  • '+51'
  • code('Madagascar')
  • '+261'
  • ***code('Russia')
  • '+7'
  • code('Australia')
  • '+61'
  • code('Israel')
  • '+972'

importing the 'phoneCode' function. from pycountrycode.countrycode import phoneCode

  • phoneCode('+52')
  • 'Mexico'
  • phoneCode('+56')
  • 'Easter Island'
  • phoneCode('+1')
  • 'United States of America'
  • phoneCode('+7')
  • 'Russia'
  • phoneCode('+44')
  • 'Britain'
  • phoneCode('+86')
  • 'China'

Project details


Download files

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

Source Distribution

pycountrycode-1.1.3.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

pycountrycode-1.1.3-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file pycountrycode-1.1.3.tar.gz.

File metadata

  • Download URL: pycountrycode-1.1.3.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for pycountrycode-1.1.3.tar.gz
Algorithm Hash digest
SHA256 39aed986c8597929b246bb32b0e5a255a3c9221201a8228f0401dfcce0359789
MD5 1cdb578b21764e05b2c47e3b94859a7a
BLAKE2b-256 2624f07a74869c9a45f7ef3d061278f23c4c9bcb51644777ae42e13bf2e63ae8

See more details on using hashes here.

File details

Details for the file pycountrycode-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: pycountrycode-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for pycountrycode-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7da79ec5ddfae72e267f5e5cd2d42b55741b6781b89756cc2e13139af03170dd
MD5 f39af4215a918fd96d9fc4eafd138347
BLAKE2b-256 0d5c3afa8b7104e2dcd7759d42f81c9cec2ae5bfd0311e155b9eac15be5ecde2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page