Python Mini Project Report (2)
Python Mini Project Report (2)
Bachelor of Engineering
By
SHAIKH TASNEEM AZHARUL 231P043 41
SHARMA LUCKY LT KUNJ BIHARI 231P061 42
SAROJ SHRUTI SANTOSH 231P090 30
Guide:
PROF. MOHD ASHFAQUE SHAIKH
University of Mumbai
2024-2025
1
CERTIFICATE
This is to certify that the project entitled Attendance Tracker is a bonafide work of Shaikh
Tasneem Azharul (231P043), Lucky Lt Kunj Bihari Sharma (231P060), Saroj Shruti Santosh
(231P090), submitted to the University of Mumbai in partial fulfillment of the requirement for the
award of the degree of “Bachelor of Engineering” in “Computer Engineering”.
2
Project Report Approval for S.E.
This Project report entitled Attendance Tracker by Shaikh Tasneem Azharul, Lucky Lt Kunj
Bihari, Saroj Shruti Santosh, is approved for the degree of Bachelor of Computer Engineering.
Examiners
1.
2.
Guide
Prof. Mohd Ashfaque Shaikh
Date:
Place: Mumbai
3
DECLARATION
We declare that this written submission represents my ideas in my own words and where others'
ideas or words have been included, we have adequately cited and referenced the original sources.
We also declare that we have adhered to all principles of academic honesty and integrity and have
not misrepresented or fabricated or falsified any idea/data/fact/source in my submission. We
understand that any violation of the above will be cause for disciplinary action by the Institute and
can also evoke penal action from the sources which have thus not been properly cited or from
whom proper permission has not been taken when needed.
------------------------------------------------
(Shaikh Tasneem Azharul, 232P043)
------------------------------------------------
(Lucky Lt Kunj Bihari Sharma, 231P060)
--------------------------------------------
(Saroj Shruti Santosh, 231P090)
Date:
4
ABSTRACT
The Attendance Tracker is a Python based GUI application that allows users to mark their attendance
in a simple and efficient way. Built using Tkinter, it provides an intuitive interface where users can enter
their, name and ID, which are then recorded along with the current date and time in a CSV file.
This ensures that attendance records are stored systematically for future reference. The system provides
instant feedback through a confirmation message upon successful submission. Additionally users have
the option to view all recorded attendance within the application.
The project utilizes Python, Tkinter, CSV handling, and the datetime module, making it a lightweight yet
functional solution for basic attendance tracking needs.
This project serves as a practical implementation of Python concepts such as GUI design, handling, and.
It is suitable for both educational and entertainment purposes, offering a fun way to test knowledge in
various domains.
Keywords: -Attendance Tracker, Graphical User Interface (GUI), questions, , First and last name input,
Quiz topics, Event handling, Educational, Entertainment, Knowledge testing
5
CONTENTS
Sr. Title Page No.
No.
1. Introduction 7
3. Methodology 9
4. Flowchart 11
5. Algorithm 13
6. Code 15
7. Conclusion 24
8. References 25
Acknowledgement 26
6
Chapter 1
Introduction
In today's fast-paced world, maintaining accurate and efficient attendance
records is essential in educational institutions and organizations alike. Traditional
methods such as paper-based registers or manual entry systems are time-
consuming, error-prone, and lack real-time accessibility. To overcome these
limitations, we have developed an Attendance Tracker Application using Python
and its Tkinter library for the graphical user interface (GUI).
This project aims to create a simple, user-friendly application that allows
users to mark, store, and manage attendance data digitally. Python, being a
versatile and beginner-friendly language, provides robust support for data
processing and logic implementation. Tkinter, the standard GUI toolkit for Python,
enables the development of interactive desktop applications with minimal code
overhead.
The application includes core functionalities such as adding new students,
marking attendance, viewing daily records, and exporting reports. It is designed to
be lightweight, responsive, and suitable for use in schools, colleges, or small
businesses. Additionally, the modular structure and clean interface make it easy
for future enhancements, such as integrating a database or biometric input.
Overall, this project not only showcases the practical implementation of
Python and Tkinter but also highlights the importance of automation in improving
administrative efficiency.
7
Chapter 2
This survey indicates that while there are many attendance solutions
available, there remains a niche for user-friendly, desktop-based tools that
are customizable, offline-capable, and suitable for small to medium-scale use
—precisely what this project aims to deliver.
8
Chapter 3
Methodology
Methodology
The development of the Attendance Tracker application followed a structured
methodology to ensure asystematic approach and timely completion. The Waterfall Model
was adopted for this project, consisting of distinct phases: Requirement Analysis, Design,
Implementation, Testing, and Deployment. Below is a detailed explanation of each phase:
1. Requirement Analysis
Identified the need for a simple, offline, and cost-effective attendance system.
Created wireframes for the GUI using Tkinter components such as buttons,
labels, entry fields, and tables.
Decided on the storage mechanism (e.g., CSV file or SQLite database) for data
persistence.
Flowcharts and UML diagrams were prepared to visualize the workflow and
system logic.
3. Implementation
Developed the application using Python for backend logic and Tkinter for GUI
development.
Modules were created for:
o Student registration
9
o Attendance marking
o Record viewing
o Report exporting
Executed user testing with sample users (e.g., students or staff) to gather feedback
on usability.
Fixed bugs and optimized performance based on test results.
10
.
Chapter 4
Flowchart
11
12
13
Chapter 5
Algorithm
Step 1: Start
14
o Autofill the form fields with selected record data.
15
Chapter 6
CODE
dashboard.py:
import csv
import tkinter as tk
from tkinter import ttk
import sqlite3
from tkinter import messagebox
def mark_attendance():
student_id = entry_id.get()
student_name = entry_name.get()
date = entry_date.get()
status = status_var.get()
conn = sqlite3.connect("attendance.db")
cursor = conn.cursor()
conn.commit()
16
conn.close()
def select_record():
selected_item = attendance_table.selection()
if not selected_item:
messagebox.showerror("Error", "Please select a record to edit!")
return
entry_name.delete(0, tk.END)
entry_name.insert(0, item_values[2])
entry_date.delete(0, tk.END)
entry_date.insert(0, item_values[3])
def save_changes():
selected_item = attendance_table.selection()
if not selected_item:
messagebox.showerror("Error", "Please select a record to save
changes!")
return
17
# Get updated values
new_id = entry_id.get()
new_name = entry_name.get()
new_date = entry_date.get()
new_status = status_var.get()
conn = sqlite3.connect("attendance.db")
cursor = conn.cursor()
conn.commit()
conn.close()
def view_attendance():
🔍
search_query = search_entry.get().strip() # Get search input
print(f" Searching for: {search_query}") # Debugging print
conn = sqlite3.connect("attendance.db")
cursor = conn.cursor()
18
# Query with filtering
if search_query:
cursor.execute("SELECT * FROM attendance WHERE student_id
LIKE ? OR student_name LIKE ? OR date LIKE ?",
(f"%{search_query}%", f"%{search_query}%", f"%
{search_query}%"))
else:
cursor.execute("SELECT * FROM attendance")
rows = cursor.fetchall()
conn.close()
def delete_all_records():
confirm = messagebox.askyesno("Confirm", "Are you sure you want
to delete all records?")
if not confirm:
return
conn = sqlite3.connect("attendance.db")
cursor = conn.cursor()
19
view_attendance() # Refresh the table
def export_to_csv():
conn = sqlite3.connect("attendance.db")
cursor = conn.cursor()
conn.close()
if not rows:
messagebox.showwarning("Warning", "No records to export!")
return
dashboard = tk.Toplevel()
dashboard.title("Admin Dashboard")
dashboard.geometry("700x550")
# Search Bar
tk.Label(dashboard, text="Search:").pack(pady=5)
search_entry = tk.Entry(dashboard)
search_entry.pack(pady=5)
tk.Button(dashboard, text="Search",
command=view_attendance).pack(pady=5)
20
# Table for Attendance Records
columns = ("ID", "Student ID", "Name", "Date", "Status")
attendance_table = ttk.Treeview(dashboard, columns=columns,
show="headings")
attendance_table.pack(pady=10)
# Buttons
tk.Button(dashboard, text="Refresh Records",
command=view_attendance).pack(pady=5)
tk.Button(dashboard, text="Edit Record",
command=select_record).pack(pady=5)
tk.Button(dashboard, text="Save Changes",
command=save_changes).pack(pady=5)
tk.Label(dashboard, text="Status:").pack(pady=2)
status_var = tk.StringVar(value="Present")
tk.Radiobutton(dashboard, text="Present", variable=status_var,
value="Present").pack()
tk.Radiobutton(dashboard, text="Absent", variable=status_var,
21
value="Absent").pack()
dashboard.mainloop()
database.py:
import sqlite3
import bcrypt
def create_tables():
conn = sqlite3.connect("attendance.db")
cursor = conn.cursor()
conn.commit()
conn.close()
conn = sqlite3.connect("attendance.db")
22
cursor = conn.cursor()
if existing_admin:
print("Admin already exists. Updating password...")
cursor.execute("UPDATE admin SET password=? WHERE username=?",
(hashed_password, username))
else:
print("Adding new admin...")
cursor.execute("INSERT INTO admin (username, password) VALUES (?, ?)",
(username, hashed_password))
conn.commit()
conn.close()
print("Admin credentials stored successfully!")
conn.close()
if result:
stored_password = result[0]
23
# Debugging prints
print(f"Stored Hash (bytes): {stored_password}")
print(f"Entered Password: {password}")
return False
login.py:
import tkinter as tk
from tkinter import messagebox
import dashboard
import sqlite3
import bcrypt
# Import the main dashboard after login
conn.close()
def login():
username = username_entry.get()
password = password_entry.get()
if authenticate(username, password):
24
messagebox.showinfo("Login Successful", "Welcome, Admin!")
root.destroy() # Close login window
dashboard.open_dashboard() # Open main dashboard
else:
messagebox.showerror("Login Failed", "Invalid username or password")
# GUI setup
root = tk.Tk()
root.title("Admin Login")
root.geometry("300x200")
tk.Label(root, text="Username:").pack(pady=5)
username_entry = tk.Entry(root)
username_entry.pack(pady=5)
tk.Label(root, text="Password:").pack(pady=5)
password_entry = tk.Entry(root, show="*")
password_entry.pack(pady=5)
root.mainloop()
Chapter 7
CONCLUSION
25
Tkinter demonstrates the effectiveness of combining GUI-based
applications with backend data handling in creating practical solutions
for real-world problems. Through this project, key programming
concepts such as event-driven programming, file handling, and modular
design were implemented to build a user-friendly interface for tracking
attendance efficiently.
This project also highlights how Python, with its powerful libraries like Tkinter for
GUI and pandas or CSV modules for data storage, can be leveraged to create scalable
and maintainable desktop applications. The integration of additional features such as
facial recognition, Excel reporting, and automated notifications further enhances the
system's capabilities.
Overall, this project not only improves manual attendance tracking systems but
also provides a strong foundation for future enhancements, such as database
integration or cloud-based access, making it highly adaptable for use in educational
institutions or workplaces.
26
CHAPTER 8
REFERENCES
References
1. TheRealM4rtin. (2021). Attendance Management System using Python and Tkinter.
GitHub Repository. Retrieved from:
https://github.com/TheRealM4rtin/attendancemanagementsystem
2. TechZone. (2021). Attendance Management System using Python, Tkinter and Filing
[Video]. YouTube. Retrieved from:
https://www.youtube.com/watch?v=YpKp5nVIxOs
3. Code Masala Bytes. (2022). Simple Attendance Tracker Using Python: A Step-by-Step
Guide. Retrieved from:
https://codemasalabytes.com/projects/simple-attendance-tracker-using-python-a-
step-by-step-guide/
4. Code With Faraz. (2023). GUI Face Recognition Attendance System Using Python and
Tkinter. Retrieved from:
https://www.codewithfaraz.com/python/46/gui-face-recognition-attendance-system-
using-python-and-tkinter
5. Soumya18. (2021). Attendance Tracker Application. GitHub Repository. Retrieved
from:
https://github.com/i-soumya18/Attendance-Tracker
27
Acknowledgement
We are profoundly grateful to Prof. Mohd Ashfaque Shaikh for his expert guidance and
continuous encouragement throughout to see that this project rights its target.
We would like to express deepest appreciation towards Dr. Varsha Shah, Principal RCOE,
Mumbai, Prof. Anupam Choudhary HOD of Computer Engineering Department and Prof.
Shiburaj Pappu Dean of Computer Engineering Department whose invaluable guidance
supported us in this project.
At last, we must express our sincere heartfelt gratitude to all the staff members of Computer
Engineering Department who helped us directly or indirectly during this course of work.
28