Skip to content

Commit 21d0030

Browse files
committed
Added Internet Speed Test in Python
1 parent 675deb6 commit 21d0030

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed
8.81 KB
Loading

Python/Internet Speed Test/Readme.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# INTERNET SPEED TEST
2+
3+
Used to find the download speed, upload speed and ping of the internet you are connected to.
4+
5+
## Set Up
6+
7+
Download dependencies using ``` pip install tk``` and ``` pip install speedtest-cli```
8+
9+
## To run the script and its Output :
10+
11+
Just run the code in whatever terminal you use.
12+
13+
After running the code a window will appear and click on speed test.
14+
15+
## Author
16+
17+
<a href="https://github.com/Shaishav0507">Shaishav Rastogi</a>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import tkinter as tk
2+
import speedtest
3+
from tkinter import messagebox
4+
5+
st = speedtest.Speedtest()
6+
root = tk.Tk()
7+
root.geometry("400x400")
8+
root.title("SpeedTest")
9+
root.config(bg="#3b4d61")
10+
font = ("Verdana",15, "bold")
11+
12+
def check():
13+
messagebox.showinfo("Confirmation", '''Speed Test Starting .....
14+
It may take upto 1 min''')
15+
d.configure(text=str(st.download()//10**6)+"Mbps")
16+
u.configure(text=str(st.upload()//10**6)+"Mbps")
17+
p.configure(text=str(int(st.results.ping))+"MS")
18+
l.configure(text="Speed Test Complete")
19+
20+
dspeed = tk.Label(root,text="Download Speed:",bg="#3b4d61",fg="yellow",font=font)
21+
dspeed.place(x=10,y=10)
22+
d = tk.Label(root,text="0 Mbps",bg="#3b4d61",fg="yellow",font=font)
23+
d.place(x=250,y=10)
24+
uspeed = tk.Label(root,text="Upload Speed:",bg="#3b4d61",fg="yellow",font=font)
25+
uspeed.place(x=10,y=50)
26+
u = tk.Label(root,text="0 Mbps",bg="#3b4d61",fg="yellow",font=font)
27+
u.place(x=250,y=50)
28+
ping = tk.Label(root,text="Ping:",bg="#3b4d61",fg="yellow",font=font)
29+
ping.place(x=10,y=90)
30+
p = tk.Label(root,text="0 MS",bg="#3b4d61",fg="yellow",font=font)
31+
p.place(x=250,y=90)
32+
33+
l = tk.Label(root,text="Click Here to start speed test",bg="#3b4d61",fg="yellow",font=(15))
34+
l.place(x=50,y=250)
35+
b = tk.Button(root,text="Speed Text",command=check,bg="yellow",fg="black")
36+
b.place(x=50,y=300,height=40,width=300)
37+
root.mainloop()

0 commit comments

Comments
 (0)