Member-only story

Check Internet Speed using Python

Python Coding
Aug 16, 2024

--

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

--

--

Python Coding
Python Coding

Written by Python Coding

Learn python tips and tricks with code I Share your knowledge with us to help society. Python Quiz: https://www.clcoding.com/p/quiz-questions.html

No responses yet