DEV Community

Sachin pagar
Sachin pagar

Posted on

phone number tracker app in Python

For coding purpose please read this original Article How to trace mobile number and get information using python
Requirements
phone-iso3166
pycountry
Tkinter
Install the following python libraries for you to able to completely follow through this tutorial

Installation
pip install python-tk, phone-iso3166 , pycountry
We are going to use phone-iso3166 to determine the get alpha_2 letters of the country from the number and pycountry to determine the official name of the country using alpha_2 letters we obtained from phone-iso3166.

Sample code

import pycountry
from phone_iso3166.country import phone_country
code = phone_country("255757295721")
code
'TZ'
pycountry.countries.get(alpha_2 = code)
Country(alpha_2='TZ', alpha_3='TZA', common_name='Tanzania', name='Tanzania, United Republic of', numeric='834', official_name='United Republic of Tanzania')

Resources :
https://pythonslearning.com/2020/11/how-to-trace-mobile-number-and-get-information-using-python.html


Top comments (0)