Coders Packet

Python Script to check the Internet Speed.

By Paras Rawat

A python script to check the Internet speed of your connection using the speedtest-cli package.

We will be checking the download speed, upload speed, and ping of our connection using the speedtest-cli package.

First, we need to install the package. To install it type the below command in your terminal:

  " pip install speedtest-cli "

Now import speedtest and create a new object 'st' using the Speedtest() method of the speedtest module.

To get the download and upload speed of our connection we will be using the download() and upload() method to perform the download and upload speed tests respectively.

By default the speed is returned in 'bytes' therefore we will be using the floor division method with 10**6 to convert it into 'Mbps'.

 

       

 

Download Complete Code

Comments

No comments yet