Score Tracker GUI using Python!
Introduction
This scenario depicts the struggle of an avid sports fan who struggles to search for each league individually, which can be time consuming. This Python project aims to solve this problem using PyQt5, various APIs, and a database.
Backend — API backend source / SQLITE3 Database
Frontend — PYQT5
Libraries — Request libraries, JSON libraries , Pandas, PYQT5
Landing.py
Landing.py is the main window that gives the user the access to view scores from two methods API and Database. The user can view the score from IPL NBA and Premier League using any of these methods. In technical terms the Landing.py acts as a a gateway to subprocess in the form of QPushButtons.
NBA Score Retrieval from API
This button retrieves the scores directly from the API using the backend source from the API Provider — api.balldontlie.io.
The libraries used are Requests libraries and JSON libraries .
Get Isaiah Panicker’s stories in your inbox
Join Medium for free to get updates from this writer.
Mainly we use GET requests to get a JSON response which fetches data from the URL that includes a specific parameter that calls the scores from a specific date. We then check if the response is valid or not . The response which is in JSON format is then converted to python dictionaries
NBA Score Retrieval from Data Base(DB)
This relatively follows the same format from the API , the only difference is that we create a connection from the API to the SQLITE3 Database ,after making a connection, the Database has access scores from the API .
Using the same Methadology we create different subprocesses for IPL and Football
Football Score Retrieval from API
Football Score Retrieval from Database(DB)
IPL Score Retrieval from API
IPL Score Retrieval from DataBase(DB)
Future Enhancements
Future GUI versions will feature a refined design coupled with the addition of two more sports trackers and I will look to create my own API’s for the Score Tracker for a seamless integrated project. A possible web browser may follow.
Links
Click here to connect with me on Linkedin




