pip install speedtest-cli
import speedtest as st
def Speed_Test():
test = st.Speedtest()
down_speed = test.download()
down_speed = round(down_speed / 10**6, 2)
print("Download Speed in Mbps: ", down_speed)
up_speed = test.upload()
up_speed = round(up_speed / 10**6, 2)
print("Upload Speed in Mbps: ", up_speed)
ping = test.results.ping
print("Ping: ", ping)
Speed_Test()
#source code -> clcoding.com
Download Speed in Mbps: 20.57
Upload Speed in Mbps: 18.47
Ping: 26.177
0 Comments:
Post a Comment