How to use 'python speed test' in Python

Every line of 'python speed test' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
29def speed_test():
30 speed_info = os.popen('speedtest-cli --csv').read()
31 speed_info = speed_info.split(',')
32 speed_data = {}
33 speed_data['Server ID'] =speed_info[0].strip()
34 speed_data['Sponsor'] =speed_info[1].strip()
35 speed_data['Server_Name'] =speed_info[2].strip()
36 speed_data['Distance'] =speed_info[4].strip()
37 speed_data['Ping'] =speed_info[5].strip()
38 speed_data['Download'] =speed_info[6].strip()
39 speed_data['Upload'] =speed_info[7].strip()
40 return speed_data

Related snippets