1>>> import pyspeedtest
2>>> st = pyspeedtest.SpeedTest()
3>>> st.ping()
49.306252002716064
5>>> st.download()
642762976.92544772
7>>> st.upload()
819425388.307319913
9
1$ pyspeedtest -h
2usage: pyspeedtest [OPTION]...
3
4Test your bandwidth speed using Speedtest.net servers.
5
6optional arguments:
7 -d L, --debug L set http connection debug level (default is 0)
8 -m M, --mode M test mode: 1 - download
9 2 - upload
10 4 - ping
11 1 + 2 + 4 = 7 - all (default)
12 -r N, --runs N use N runs (default is 2)
13 -s H, --server H use specific server
14 -v, --verbose output additional information
15 --version show program's version number and exit
16
1$ pyspeedtest
2Using server: speedtest.serv.pt
3Ping: 9 ms
4Download speed: 148.17 Mbps
5Upload speed: 18.56 Mbps
6