Skip to content

Commit c4608f0

Browse files
authored
Merge pull request HarshCasper#420 from vvHacker007/wifi
wifi speed tester
2 parents 1a69b20 + 61aa9fe commit c4608f0

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

Python/Wifi Speed Tester/Capture.PNG

103 KB
Loading

Python/Wifi Speed Tester/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Wifi Speed Tester
2+
In this I have created a python script to print and notify the wifi **download speed, upload speed and the ping** to test the internet connection.
3+
4+
## Packages Used
5+
- speedtest
6+
- win10toast
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# importing requiered modules
2+
import win10toast
3+
import speedtest
4+
5+
st = speedtest.Speedtest()
6+
7+
#download speed
8+
download = st.download()/1048576
9+
10+
#upload speed
11+
upload = st.upload()/1048576
12+
servernames =[]
13+
names = st.get_servers(servernames)
14+
15+
#ping
16+
ping = st.results.ping
17+
18+
#storing the values in a list
19+
data = [download,upload,ping]
20+
formated_data = ['%.2f' % elem for elem in data]
21+
22+
#creating a message for the notification
23+
message = 'Download Speed: {}Mbps, \nUpload Speed: {}Mbps,\n Ping: {}ms'.format(*formated_data)
24+
25+
#creating a notification window
26+
toaster = win10toast.ToastNotifier()
27+
28+
#printing the data
29+
print(message)
30+
31+
#displaying the notification
32+
toaster.show_toast('Wifi Speedtest Successfull!', message, duration=20)
33+
34+

0 commit comments

Comments
 (0)