Skip to content

Commit 2942aa0

Browse files
authored
Merge pull request #101 from prathimacode-hub/main
PR : Internet Speed Tracker
2 parents af3204d + 4ab2a2b commit 2942aa0

File tree

5 files changed

+85
-0
lines changed

5 files changed

+85
-0
lines changed

I/internet-speed-tracker/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## INTERNET SPEED TRACKER
2+
3+
**Goal**:
4+
5+
The goal of this project is to help in testing the internet speed and giving the relevant download and upload details.
6+
7+
**Purpose**
8+
9+
Today, when everything is online it has become necessary to have the proper internet speed. This application provides you to calculate the download speed, upload speed of your network in mbps and ping in ms.
10+
11+
**Description**
12+
13+
This application gives you the download speed, upload speed and ping details. Lesser the ping, the better is your network. Ping is given in millisecond and the download and upload speed in mbps.
14+
15+
**Workflow**
16+
17+
The user has to run the program and click onto the button "Get Speed". The system will take few seconds to calculate and gives you the speed and ping of your network. So have patience and wait for the system to respond and with just single click you are ready with the speed of your network.
18+
19+
**Screenshots**
20+
21+
First Screen
22+
23+
<img src="first_screen.png" /><br>
24+
25+
Output Screen
26+
27+
<img src="output_screen.png" /><br>
11.9 KB
Loading
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
from tkinter import *
2+
from speedtest import Speedtest
3+
4+
#Function for checking the speed
5+
def update_text():
6+
speed_test = Speedtest()
7+
download = speed_test.download()
8+
upload = speed_test.upload()
9+
download_speed = round(download / (10**6), 2)
10+
upload_speed = round(upload / (10**6), 2)
11+
speed_test.get_servers([])
12+
ping=speed_test.results.ping
13+
down_label.config(text= "Download Speed - " + str(download_speed) + "Mbps")
14+
up_label.config(text= "Upload Speed - " + str(upload_speed) + "Mbps")
15+
ping_label.config(text="Ping - " + str(ping) + "ms")
16+
17+
root = Tk()
18+
#Title Of Application
19+
root.title("Internet Speed Tracker")
20+
#Dimension of application window
21+
root.geometry('350x350')
22+
root.resizable(0,0)
23+
root.config(bg="cyan")
24+
font1=("Times",14,"bold")
25+
font2=("Times",12,"bold","italic")
26+
27+
#Added the logo to application
28+
l=PhotoImage(file="speedtest_logo.gif")
29+
root.iconphoto(False,l)
30+
31+
#Functions for HoverButton
32+
def on_enterbutton(r):
33+
button.config(background="light blue",foreground="black")
34+
35+
def on_leavebutton(r):
36+
button.config(background="SystemButtonFace",foreground="black")
37+
38+
button = Button(root, text="Get Speed", width=30,command=update_text)
39+
button.pack(padx=20,pady=20)
40+
41+
button.bind('<Enter>',on_enterbutton)
42+
button.bind('<Leave>',on_leavebutton)
43+
44+
labelA=Label(root,text="Click the button to check speed!!",bg="cyan",font=font2,padx=5,pady=5)
45+
labelA.pack()
46+
labelB=Label(root,text="Checking the speed takes time..Please wait..",bg="cyan",font=font2,padx=10,pady=10)
47+
labelB.pack()
48+
down_label = Label(root, text="",bg="cyan",padx=20,pady=20,font=font1)
49+
down_label.pack()
50+
up_label = Label(root, text="",bg="cyan",padx=20,pady=20,font=font1)
51+
up_label.pack()
52+
ping_label=Label(root,text="",bg="cyan",padx=20,pady=20,font=font1)
53+
ping_label.pack()
54+
55+
root.mainloop()
13.7 KB
Loading
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
speedtest-cli
2+
tkinter
3+
speedtest

0 commit comments

Comments
 (0)