Skip to content

wolf0403/pySpeedtest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pySpeedTest

This is a Python client for the SpeedTest.net bandwidth measurement service.

speedtest.py

Together with asynchttp.py this is the client script. It was tested on Python 2.7, OS X with no additional dependencies apart from the standard library (with asyncore). The asynchttp.py code was modified from 3 to support HTTP/1.1 and pipelining.

To run this test, invoke with one additional argument, the base URL for an Speedtest (or "Mini server"). Standard servers are provided by the Speedtest.net service and can be found in the servers.json file, or generated by the loadservers.py script (see below).

$ ./speedtest.py http://speedtest-syd.cdn.on.net/speedtest/
Lantency: 311.30 ms
Speed:  1.81 Mbps

loadservers.py

This script loads the server list from 1 that are used by the web version and generate the JSON format that are easier to be used. This script requires Requests 4 and lxml 5. The generated JSON files could be easily quired using the jq tool:

$ cat servers.json | jq '.CN | keys'
[
  "http://112.96.28.126/speedtest/",
  "http://112.97.192.149/speedtest/speedtest/",
  "http://202.98.1.11/mini/speedtest/",
  "http://ccpn.3322.org/speedtest/",
  "http://down.yiinet.net/speedtest/speedtest/",
  "http://service.xmbtn.com/speed/speedtest/",
  "http://speed.jxunicom.net/speedtest/",
  "http://speedsvr3.jxunicom.net/speedtest/",
  "http://www.ca2u.net/speedtest/speedtest/"
]

Any of these URLs could be used by the speedtest.py script for performing a test.

About

A Speedtest.net client for Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages