9/10/2023 0 Comments Speedtest python script![]() ![]() Return self.view_functions(**req.view_args)įile "/root/post_test2.py", line 11, in homeįile "/usr/lib/python3/dist-packages/speedtest.py", line 1091, in _init_įile "/usr/lib/python3/dist-packages/speedtest. Return gi_app(environ, start_response)įile "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2450, in wsgi_appįile "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1867, in handle_exceptionįile "/usr/local/lib/python3.8/dist-packages/flask/_compat.py", line 39, in reraiseįile "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2447, in wsgi_appįile "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1952, in full_dispatch_requestįile "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1821, in handle_user_exceptionįile "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1950, in full_dispatch_requestįile "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1936, in dispatch_request S = speedtest.Speedtest(source_address=source)ĮDIT: This is the error: Traceback (most recent call last):įile "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2464, in _call_ I have also tried to search before posting on StackOverflow. ![]() optional arguments: -d L, -debug L set http connection debug level (default is 0) -m M, -mode M test mode: 1 - download 2 - upload 4 - ping 1 + 2 + 4 7 - all (default) -r N, -runs N use N runs (default is 2) -s H, -server. Test your bandwidth speed using servers. I have read Speedtest python API documentation and mostly copied code from there. In a terminal: pyspeedtest -h usage: pyspeedtest OPTION. Run Here, we have used the above function on our code: import speedtest speedtest speedtest. It works well for eth0 (192.168.1.21), but I get an error if I try to use a different interface, in this case, eth1 (192.168.8.100). I would like to measure the internet speed of the different interface, in this case - eth1. If you don't want the image, set POST_IMAGE = False.įinally you have the 4x Twitter variables that you need to set.I have eth0, eth1 and wlan0 connected to my Raspberry Pi. Released: Command line interface for testing internet bandwidth using Python Python :: 2 Python :: 2.4 Python :: 2.5 Python :: 2.6 Python :: 2.7 Python :: 3 Python :: 3.1 Python :: 3.2 Python :: 3.3 Python :: 3.4 Python :: 3.5 Python :: 3.6 Python :: 3. ![]() The script is set to upload an image of the speed test results along with your tweet. Remember to make sure it's under 140 characters. TWEET = ("Hey why is my internet speed up in Chch, NZ?"ĭl, ul, ISP_DL, ISP_UL will be replaced by the actual values.Ġ.0f is formatting the numbers to have 0 decimal places. If your download or upload speed is less than this percent of the ISP's speeds then it will send the Tweet. These are in megabits per second which is the most common way they are advertised. Next you can put in your ISP's download ( ISP_DL) and upload speed ( ISP_UL) that you are paying for. If you set this, then the script will test the closest 5 servers to your ISP location. You can just have 1x server in the list if you just want to use a single server. Using Grafana you can view and explore this data easily. You may want to do this so that you can track your internet connections consistency over time. If you have a list, it will test each and then calculate the average download and upload speed. This is a small Python script that will continuously run the Speedtest CLI application by Ookla, reformat the data output and forward it on to an InfluxDB database. Language: Python Sort: Most stars sivel / speedtest-cli Star 12. The defaults is which are 2degrees & Vodafone Christchurch NZ servers. speedtest Here are 172 public repositories matching this topic. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |