Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f8a43c6

Browse files
Merge pull request avinashkranjan#1678 from Uma-95/master
Adding Phone number Tracker Project
2 parents fd21822 + 73e02d7 commit f8a43c6

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

‎Phone Number Tracker/Number.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# pip install phonenumbers in cmd
2+
3+
# importing phonenumbers module
4+
import phonenumbers
5+
6+
# calling timezone,geocoder and carrier from phonenumbers module
7+
from phonenumbers import timezone,geocoder,carrier
8+
9+
# taking phone number as input from user
10+
number=input("Enter your number (with +91): ")
11+
12+
# parse the string input to phonenumber format
13+
phone=phonenumbers.parse(number)
14+
15+
# to get the timezone of a user
16+
time=timezone.time_zones_for_number(phone)
17+
18+
# Getting carrier of a phone number
19+
car=carrier.name_for_number(phone,"en")
20+
21+
# Getting region information
22+
reg=geocoder.description_for_number(phone,"en")
23+
24+
# printing the details
25+
print("Details :")
26+
print(phone)
27+
print(time)
28+
print(car)
29+
print(reg)

‎Phone Number Tracker/readme.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Phone Number Tracker
2+
3+
Phonenumbers package is used.
4+
To import the phonenumbers package:
5+
Open command prompt and type pip install phonenumbers.
6+
7+
The following modules are imported from phonenumbers package:
8+
- geocoder: used to know the specific location to that phone number
9+
- carrier: used to know the name of service provider of that phone number
10+
- timezone:used to know the timezone
11+
12+
## Setup instructions
13+
14+
- Clone the repo to your machine
15+
- head over to the required(Phonenumber Tracker folder)
16+
- Give the phone number with the country code at required places
17+
- run the script
18+
19+
## Detailed explanation of script, if needed
20+
21+
This is a phonenumber tracker that uses phonenumbers library to get the following details :
22+
-country
23+
-service provider of the phone number
24+
25+
## Output
26+
27+
![image](https://github.com/Uma-95/Amazing-Python-Scripts/assets/99042417/23fcdd91-c864-486d-913c-675893cff6e8)
28+
29+
## Author
30+
31+
Uma Lamba
32+
33+
## Disclaimers, if any
34+
35+
Do not forget to put the country code of the number that you provide.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /