Last modified: Nov 22, 2021

python: speedtest Example

Syntax

# Download speed
.download()

# upload speed
.upload()

speedtest Example

import speedtest

# Speed test
st = speedtest.Speedtest()

# Download Speed
d_speed = st.download()

# Upload Speed
u_speed = st.upload()

print(f"Download speed: {d_speed}")

print(f"Upload speed: {u_speed}")

Output:

Download speed: 2870641.6778812124
Upload speed: 273358.9984397353