GUI Based Internet Speed Test Using Python With Source Code

Introduction:

python language is one of the most preferred programming languages in today’s scenario of the data science field. Because of its simple syntax and vast libraries/packages/modules, implementing various applications/programs/codes is very handy.

Explanation:

GUI is one of the best interfaces for a user to interact with a machine/computer. Python support Tkinter library/packages/module for implementing the GUI-based application/program/code.

The given below is the code for implementing the “GUI-Based Internet Speed Test” application/program:

The libraries/packages/modules used in this code are as follows:

tkinter: This package is used for developing graphical user interfaces (GUIs) in python.

speedtest: This package is used to test network bandwidth using speedtest.net servers

Installation:
$ pip install speedtest-cli

Run this command on your terminal to install the speedtest python module.

Source Code:

Get Discount on Top Educational Courses

Brand NameDiscount InformationCoupon Codes Link
Educative.io20% discount on Educative courses and plans
W3Schools20% discount on W3Schools courses
KodeKloud10% discount on KodeKloud courses and plans
GeeksforGeeks30% discount on GeeksforGeeks courses
Target Test Prep20% discount on Target Test Prep
Coding Ninjas₹5000 discount on Coding Ninjas courses
Skillshare40% discount on Skillshare
DataCamp50% discount on DataCamp
365 Data Science57% discount on 365 Data Science Plans
Get SmarterFlat 20% discount on Get Smarter courses
SmartKeedaFlat 40% discount on SmartKeeda courses
StackSocial20% discount on StackSocial courses
				
					# Importing Libraries Required For Code
# codewithcurious.com
from tkinter import * 
from speedtest import Speedtest

# Creation OF Function
def update_text(): 
    speed_test = Speedtest()
    download = speed_test.download()
    upload = speed_test.upload()
    download_speed = round(download / (10**6), 2)
    upload_speed = round(upload / (10**6), 2)
    down_label.config(text= "Download Speed - " + str(download_speed) + "Mbps") 
    up_label.config(text= "Upload Speed - " + str(upload_speed) + "Mbps") 


# Creation OF GUI
window = Tk()
window.title("Internet Speed Testing")
window.geometry('420x250+250+150')
button = Button(window, text="Press Here to Check Speed", width=50, command=update_text,background = '#49A')
button.pack()
down_label = Label(window, text="")
down_label.pack()
up_label = Label(window, text="")
up_label.pack()

# Closing of GUI
window.mainloop()
				
			

Output:

Find More Projects

Tilting Maze Game Using HTML CSS And JavaScript Introduction Hello coders, welcome to another new blog. Today in this article we’ll learn …

Tetris Game Using HTML CSS And JavaScript Introduction Hello coders, welcome to another new blog. Today in this article we’ll learn to …

Catch The Insect Game Using HTML CSS And JavaScript Introduction Hello coders, welcome to another new blog. Today in this article we …

electronics Store website using html CSS and JavaScript Introduction Hello coders, welcome to another new project. As you know our today’s project …

Digital Marketing Agency website Using HTML, CSS and JavaScript Introduction Hello coders, welcome to another new blog. Today in this project we’ll …

Fruit Slicer Game Using HTML CSS And JavaScript Introduction Hey coders, welcome to another new blog. Today in this blog we’ve created …

Get Huge Discounts
More Python Projects