INTERNET SPEED TEST USING SPEEDTEST PYTHON SCRIPT .................................................... ....................................................
This is a simple Python script that utilizes the "speedtest" module to perform an internet speed test. The script measures the download speed, upload speed, and ping (latency) to the best Speedtest.net server and displays the results in megabits per second (Mbps).
- Python 3.x installed on your system
- "speedtest" module installed (you can install it using
pip install speedtest-cli)
-
Clone the Repository
Clone this repository to your local machine using Git or download the script directly from the GitHub page.
-
Install the Required Module
Ensure that the "speedtest" module is installed in your Python environment. If you don't have it, install it using the following command:
pip install speedtest-cli
-
Run the Script
Open your terminal or command prompt and navigate to the directory containing the
speedtest_script.pyfile.Run the script using Python 3:
python3 speedtest_script.py -
View the Results
The script will initiate the internet speed test and display the results once the test is completed. The results will include:
- Best server for the speed test
- Download speed in Mbps
- Upload speed in Mbps
- Ping (latency) in milliseconds
The output will look similar to the following:
Best server: speedtest.example.com Download speed is: XX.XX Mbps Upload speed is: XX.XX Mbps Ping: X.XXX ms
If you want to test the speed using a specific website link, you can modify the target_website variable in the script. Replace "example.com" with the desired website link. The script will then attempt to find the best Speedtest.net server that matches the given website.
Please note that the speed test results can vary based on network conditions, server load, and other factors. It's advisable to run the test multiple times and at different times of the day to get a more accurate representation of your internet speed.
Feel free to update and customize the README file further as needed to provide more information about your project and how others can use it. Also, make sure to replace "speedtest_script.py" with the actual name of your Python script file in the README file if it has a different name.