Skip to content

klrmac/UpCheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UpCheck Application

This is a Python GUI application that allows users to check the status of a domain.

To set up the Python project structure for the "UpCheck" application, you need to create the following files:

  1. main.py: This will be the entry point of the application where the GUI will be initialized.
# main.py
import tkinter as tk

def main():
    # Initialize the GUI window here
    pass

if __name__ == "__main__":
    main()
  1. domain_checker.py: This file will contain the logic for checking the domain status.
# domain_checker.py
import requests

def check_domain_status(domain):
    try:
        response = requests.get(f"http://{domain}")
        if response.status_code == 200:
            return "alive"
        else:
            return "dead"
    except requests.ConnectionError as e:
        return "Connection Error: " + str(e)
  1. gui.py: This file will contain the GUI setup using Tkinter.
# gui.py
import tkinter as tk
from domain_checker import check_domain_status

class UpCheckApp:
    def __init__(self, master):
        self.master = master
        self.master.title("UpCheck")
        
        self.domain_entry = tk.Entry(self.master)
        self.domain_entry.pack()
        
        self.check_button = tk.Button(self.master, text="Check Status", command=self.check_domain)
        self.check_button.pack()
        
        self.status_label = tk.Label(self.master, text="")
        self.status_label.pack()
        
    def check_domain(self):
        domain = self.domain_entry.get()
        status = check_domain_status(domain)
        self.status_label.config(text=f"Domain status: {status}")
        
def create_gui():
    root = tk.Tk()
    app = UpCheckApp(root)
    root.mainloop()
  1. requirements.txt: This file will list the necessary dependencies for the project.
requests
  1. README.md: This file can contain information about the project, how to run it, and any other relevant details.
# UpCheck Application

This is a Python GUI application that allows users to check the status of a domain.
To run the application, make sure you have the dependencies installed by running:
  1. .gitignore: This file will specify files and directories that should be ignored by Git.
__pycache__
venv

To implement this task, follow these steps:

  1. Create a new project directory for the "UpCheck" application.
  2. Inside the project directory, create the files listed above with the respective content.
  3. Create a virtual environment for the project (recommended).
  4. Install the necessary dependencies by running pip install -r requirements.txt.

After completing these steps, the Python project structure for the "UpCheck" application will be set up with the necessary files and folders.

About

Uptime Checker for Domain Names.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages