Testing Net Speed in Python
- You can test your internet speed using a python code as shown here
- To do this you will need to install a library --speedtest
- After that you can run this program, your results will be shown in mbps
- But there r many versions of this program and this is the most simplified of them
Source Code:
#Follow @Programmerfect
import speedtest
st = speedtest.Speedtest()
option = int(input("""What Speed do you want to test:
1) Download Speed
2) Upload Speed
3) Ping
Your Choice: """))
if option == 1:
print(st.download())
elif option == 2:
print(st.upload())
elif option == 3:
servernames = []
st.get_servers(servernames)
print(st.results.ping)
else:
print("Please enter the correct choice !")
import speedtest
st = speedtest.Speedtest()
option = int(input("""What Speed do you want to test:
1) Download Speed
2) Upload Speed
3) Ping
Your Choice: """))
if option == 1:
print(st.download())
elif option == 2:
print(st.upload())
elif option == 3:
servernames = []
st.get_servers(servernames)
print(st.results.ping)
else:
print("Please enter the correct choice !")