StudentManagementSystem

Download Python File 

Swami Vivekanand Government Model School

Barundhan Talera Bundi

 




Academic year 2023-24

PROJECT REPORT ON:

STUDENT MANAGEMENT SYSTEM

 

 

Roll Number:

Name: Vidit Shringi

Class: XII

Subject: Informatics Practices

Subject code: 065

Project Guide: Mrs. Nidhi Kotya

CERTIFICATE OF EXEMPLARY PROJECT WORK

 




 

This document serves as a testament to the commendable diligence, unwavering commitment, and exceptional acumen demonstrated by Vidit Shringi, a distinguished scholar of Swami Vivekanand Government Model school bearing the Roll No. _______________.

 

Vidit has successfully brought to fruition a project of substantial significance titled "Student Management System", under the expert tutelage of Mrs. Nidhi Kotiya. This project stands as a testament to Vidit's intellectual curiosity, technical prowess, and commendable dedication.

 

The project has been meticulously reviewed and has surpassed our expectations in its depth, precision, and comprehensive understanding of the subject matter. It is with immense pride that we acknowledge the effort and hard work invested by Vidit in this project.

 

We hereby approve this project for submission, confident in the knowledge and skills demonstrated by Vidit through this work. We anticipate that this project will serve as a stepping stone towards many more significant accomplishments in Vidit's academic journey.

 

Date: ____________                                                                        __________________

                                                                                                                        Principal sign

  _________________                                                                            

     Mrs. Nidhi Kotiya

Lecturer-Informatics Practices                                                                   Schhol  Seal

 

 

                                                 

Acknowledgement
 
I, Vidit Shringi, am deeply grateful for the opportunity to express my sincere gratitude to my esteemed teacher, Mrs. Nidhi Kotiya, and our respected Principal, Dr. Sanadhya sir, of Swami Vivekanand Govt Model School, Talera.
 
Mrs. Nidhi Kotiya's invaluable guidance, profound knowledge, and unwavering support have been instrumental in the successful completion of this project on the Student Management System for Informatic Practices. Her dedication towards nurturing students and her motivational guidance have been the beacon that guided me through the challenges encountered during the project.
 
I would also like to extend my heartfelt gratitude to Dr. Sanadhya sir, whose visionary leadership and relentless pursuit of excellence have created an environment conducive to learning and exploration.
 
This project would not have been possible without their support and guidance. I am truly grateful for their mentorship and am inspired by their passion for education.
 
Vidit Shringi

 

Introduction

 

The purpose of this project is to develop a Student Management System for Swami Vivekanand Govt Model School, Talera. This system is designed to streamline the process of managing student information, which includes but is not limited to, student registration, attendance, academic performance, and extracurricular activities.

 

In the current digital age, an efficient Student Management System is crucial for any educational institution. It not only reduces the administrative workload but also enhances the efficiency of management processes. The system provides a user-friendly interface for teachers, administrators, and students, making it easier to access and manage student data.

 

This project has been undertaken as a part of the curriculum for the Informatics Practices course. It provides practical exposure to database management concepts and equips students with the skills required to develop and manage a fully functional information system.

 

The subsequent sections of this report will detail the design, development, and implementation of the Student Management System.

Objective of the Project

 

The primary objective of this project is to design and implement a comprehensive Student Management System that can efficiently handle various administrative tasks in an educational institution. The specific objectives are as follows:

 

1. **Streamline Administrative Tasks**: To automate and streamline tasks such as student registration, attendance tracking, and academic performance monitoring, thereby reducing manual workload.

 

2. **Improve Data Management**: To provide a centralized system for storing, retrieving, and managing student data, ensuring data integrity and security.

 

3. **Enhance Accessibility**: To provide a user-friendly interface that allows easy access to student information for teachers, administrators, and students.

 

4. **Promote Transparency**: To foster transparency in the educational process by making relevant information readily available to all stakeholders.

 

5. **Practical Learning**: To provide practical exposure to students in the field of database management and software development, thereby enhancing their technical skills.


 

Python Labraries

a brief description of each library used to make below codes:

1.     tkinter: This is Python’s standard GUI (Graphical User Interface) package. It provides a powerful object-oriented interface to the Tk GUI toolkit and is used to create windows, labels, buttons, menus, textboxes, and other widgets in a desktop application.

2.     tkinter.messagebox: This is a module in tkinter that provides functions to create and display message boxes in your applications. It’s useful for displaying information, warnings, errors, or questions to the user.

3.     pandas: This is a powerful data manipulation library in Python. It provides data structures and functions needed to manipulate structured data, including functionality for manipulating numerical tables and time series.

4.     mysql.connector: This is a database connector for Python that connects Python to a MySQL server. It converts Python data types to MySQL data types and vice versa.

5.     pyfiglet: This is a Python implementation of the FIGlet specification. It takes ASCII text and renders it in various visually appealing ways in the console.

6.     ttkbootstrap: This is a library that provides a collection of themed widgets for tkinter. It allows you to create visually appealing and modern-looking GUI applications with tkinter.

7.     PySimpleGUI: This is a library for creating GUIs in Python in a simple and intuitive way. It’s designed to be easy to use and is capable of creating complex GUI layouts.

8.     PIL (Pillow): This is a fork of the Python Imaging Library (PIL). It adds some user-friendly features like opening, manipulating, and saving different image file formats. The ImageTk module contains support to create and modify Tkinter BitmapImage and PhotoImage objects.

 


 

Code for installing lab in system

·      pip install pandas

·      pip install mysql-connector-python

·      pip install pyfiglet

·      pip install ttkbootstrap

·      pip install PySimpleGUI

·      pip install pillow


 

mechanism of working

 

 

 

 

 


 

 

MYSQL.

First, you need to create a table in your MySQL database that can store the data from your CSV file. The table should have the same columns and data types as your CSV file. For example, you can use the following SQL command to create a table called login:

CREATE TABLE login (

username VARCHAR(50),

password VARCHAR(50)

);

Finally, you need to create another table in your MySQL database that can store the data from your student information form. The table should have the same columns and data types as your form inputs. For example, you can use the following SQL command to create a table called student:

CREATE TABLE student (

Sr_No INT,

First_Name VARCHAR(50),

Last_Name VARCHAR(50),

Fathers_Name VARCHAR(50),

Class VARCHAR(50),

Number INT,

DOB DATE,

Caste VARCHAR(50),

Gender VARCHAR(50)

);

You don’t need to insert the data from your form into the table, because you already have a Python function that does that for you. You just need to make sure that the table name and the column names match the ones in your Python code.

 

 

 

 

 

 


 

   PYTHON

Ø     Combiner

Ø  import subprocess

Ø  #List of your python scripts

Ø   

Ø  scripts = ["SignUp.py", "logIn.py"]

Ø  for script in scripts:

Ø      subprocess.call(["python", script])

Ø   

Ø  print('''

Ø      +------------------------------+

Ø      |___________Hello______________|

Ø      |  FOR DETELE IN STUDENT DATA  |

Ø      |       TYEP "DELETE"          |

Ø      +------------------------------+

Ø                                     

Ø  ''')

Ø  while True:

Ø      select=input("\t\t\t\t:----->")

Ø      print('Teacher','you select',select)

Ø   

Ø      delete="delete.py"

Ø   

Ø      if select == "DELETE" :

Ø          subprocess.call(["python",delete])

Ø      else:

Ø          print("\n\t<---!!!ABORT!!!--->")

Ø          import time

Ø          # Wait for 5 seconds

Ø          time.sleep(10)

Ø          # Quit the process

Ø          quit()

Ø 



 

 

 

 

Ø     SIGN UP FORM

Ø  import tkinter as tk

Ø  from tkinter import messagebox

Ø  from ttkbootstrap import Style

Ø  import csv

Ø  import pyfiglet

Ø  def save_data():

Ø      # Get user input

Ø      username = username_var.get()

Ø      password = password_var.get()

Ø      name = name_var.get()

Ø      age = age_var.get()

Ø      dob = dob_var.get()

Ø      subject = subject_var.get()

Ø   

Ø      # Define data

Ø      data = [

Ø          ['username', 'password', 'name', 'age', 'dob', 'subject'],

Ø          [username, password, name, age, dob, subject]

Ø      ]

Ø   

Ø      # Write data to CSV file

Ø      with open('login.csv', 'w', newline='') as file:

Ø          writer = csv.writer(file)

Ø          writer.writerows(data)

Ø   

Ø      messagebox.showinfo("Info", "login.csv file has been created.")

Ø   

Ø  def delete_data():

Ø      # Clear the CSV file

Ø      with open('login.csv', 'w', newline='') as file:

Ø          writer = csv.writer(file)

Ø          writer.writerow(['username', 'password', 'name', 'age', 'dob', 'subject'])

Ø   

Ø      messagebox.showinfo("Info", "Data deleted successfully.")

Ø   

Ø  def display_data():

Ø      # Read data from CSV file

Ø      with open('login.csv', 'r') as file:

Ø          reader = csv.reader(file)

Ø          data = list(reader)

Ø   

Ø      # Create a new window

Ø      new_window = tk.Toplevel(root)

Ø      new_window.title("Data")

Ø   

Ø      # Display data in the new window

Ø      for row in data:

Ø          row_text = ", ".join(row)

Ø          label = tk.Label(new_window, text=row_text)

Ø          label.pack()

Ø   

Ø  root = tk.Tk()

Ø  style = Style('minty')

Ø   

Ø  frame = tk.Frame(root)

Ø  frame.pack(anchor='w')

Ø   

Ø  username_var = tk.StringVar()

Ø  password_var = tk.StringVar()

Ø  name_var = tk.StringVar()

Ø  age_var = tk.StringVar()

Ø  dob_var = tk.StringVar()

Ø  subject_var = tk.StringVar()

Ø   

Ø  # Create labels and entry fields for each variable

Ø  for var, label_text in zip([username_var, password_var, name_var, age_var, dob_var, subject_var],

Ø                             ['Enter your username:', 'Enter your password:', 'Enter your name:', \

Ø                              'Enter your age:', 'Enter your date of birth (in YYYY-MM-DD format):',\

Ø                              'Enter your subject:']):

Ø      label = tk.Label(frame, text=label_text)

Ø      label.pack(anchor='w')

Ø      entry = tk.Entry(frame, textvariable=var)

Ø      entry.pack(anchor='w')

Ø   

Ø  button_frame = tk.Frame(frame)

Ø  button_frame.pack(anchor='w')

Ø   

Ø  save_button = tk.Button(button_frame, text='Save Data', command=save_data)

Ø  save_button.pack(side='left')

Ø   

Ø  delete_button = tk.Button(button_frame, text='Delete Data', command=delete_data)

Ø  delete_button.pack(side='left')

Ø   

Ø  display_button = tk.Button(button_frame, text='Display Data', command=display_data)

Ø  display_button.pack(side='left')

Ø   

Ø  exit_button = tk.Button(button_frame, text='Exit', command=root.destroy)

Ø  exit_button.pack(side='left')

Ø  # Display "SVGMS" in standard font

Ø  ascii_banner = pyfiglet.figlet_format("Swami \n Vivekanand \n Govt \n Model \n School")

Ø  smiley = tk.Label(root, text=ascii_banner, font=("Courier", 5))

Ø  smiley.pack()

Ø  root.mainloop()

Ø   

 

 

 

 

 

 

 

 

 

 

 

 

Ø     LOGIN & STUDENT FORM

Ø  import tkinter as tk

Ø  from tkinter import messagebox

Ø  import pandas as pd

Ø  import mysql.connector

Ø  import pyfiglet

Ø  import ttkbootstrap as ttk # import ttkbootstrap

Ø  import PySimpleGUI as sg # import pysimplegui

Ø  from PIL import Image, ImageTk # import image modules

Ø   

Ø  # Connect to MySQL

Ø  mydb = mysql.connector.connect(

Ø    host="localhost",

Ø    user="root",

Ø    password="vidit",

Ø    database="viditdb"

Ø  )

Ø   

Ø  mycursor = mydb.cursor()

Ø   

Ø  # Load CSV file

Ø  df = pd.read_csv('login.csv')

Ø   

Ø  def check_login():

Ø      user = username.get()

Ø      pwd = password.get()

Ø     

Ø   

Ø      if user in df['username'].values:

Ø          user_df = df[df['username'] == user]

Ø          if pwd == user_df['password'].values[0]:

Ø              messagebox.showinfo("Login info", "Logged in successfully")

Ø              # Store login info in MySQL

Ø              sql = "INSERT INTO login (username, password) VALUES (%s, %s)"

Ø              val = (user, pwd)

Ø              mycursor.execute(sql, val)

Ø              mydb.commit()

Ø              # Open student info form

Ø              open_form()

Ø          else:

Ø              messagebox.showinfo("Login info", "Incorrect password")

Ø      else:

Ø          messagebox.showinfo("Login info", "Username not found")

Ø   

Ø  def update_info():

Ø      # Get the values from the input boxes

Ø      sr_no = values['sr_no']

Ø      first_name = values['first_name']

Ø      last_name = values['last_name']

Ø      fathers_name = values['fathers_name']

Ø      class_ = values['class']

Ø      number = values['number']

Ø      dob = values['dob']

Ø      caste = values['caste']

Ø      gender = values['gender']

Ø   

Ø      # Update the student information in MySQL

Ø      sql = "UPDATE student SET First_Name = %s, Last_Name = %s, Fathers_Name = %s, Class = %s, Number = %s, DOB = %s, Caste = %s, Gender = %s WHERE Sr_No = %s"

Ø      val = (first_name, last_name, fathers_name, class_, number, dob, caste, gender, sr_no)

Ø      mycursor.execute(sql, val)

Ø      mydb.commit()

Ø      messagebox.showinfo("Student info", "Information updated successfully")

Ø   

Ø  def delete_info():

Ø      # Get the sr_no from the input box

Ø      sr_no = values['sr_no']

Ø   

Ø      # Delete the student information from MySQL

Ø      sql = "DELETE FROM student WHERE Sr_No = %s"

Ø      val = (sr_no,)

Ø      mycursor.execute(sql, val)

Ø      mydb.commit()

Ø      messagebox.showinfo("Student info", "Information deleted successfully")

Ø   

Ø  def clear_info():

Ø      # Clear the input boxes

Ø      window['sr_no'].update('')

Ø      window['first_name'].update('')

Ø      window['last_name'].update('')

Ø      window['fathers_name'].update('')

Ø      window['class'].update('')

Ø      window['number'].update('')

Ø      window['dob'].update('')

Ø      window['caste'].update('')

Ø      window['gender'].update('')

Ø   

Ø  def open_form():

Ø      # Use pysimplegui popup to get the student information

Ø      layout = [

Ø          [sg.Text('Sr_No'), sg.Input(key='sr_no')],

Ø          [sg.Text('First_Name'), sg.Input(key='first_name')],

Ø          [sg.Text('Last_Name'), sg.Input(key='last_name')],

Ø          [sg.Text('Fathers_Name'), sg.Input(key='fathers_name')],

Ø          [sg.Text('Class'), sg.Input(key='class')],

Ø          [sg.Text('Number'), sg.Input(key='number')],

Ø          [sg.Text('DOB'), sg.Input(key='dob')],

Ø          [sg.Text('Caste'), sg.Input(key='caste')],

Ø          [sg.Text('Gender'), sg.Input(key='gender')],

Ø          # Create a frame for the submit button

Ø          [sg.Frame('', [[sg.Button('Submit')]])],

Ø          # Create a frame for the other buttons

Ø          [sg.Frame('', [[sg.Button('Update', key='update')],

Ø                         [sg.Button('Delete', key='delete')],

Ø                         [sg.Button('Clear', key='clear')]])]

Ø      ]

Ø   

Ø      window = sg.Window('Student Information', layout)

Ø   

Ø      while True:

Ø          event, values = window.read()

Ø          if event == 'Submit':

Ø              # Store the student information in MySQL

Ø              sr_no = values['sr_no']

Ø              first_name = values['first_name']

Ø              last_name = values['last_name']

Ø              fathers_name = values['fathers_name']

Ø              class_ = values['class']

Ø              number = values['number']

Ø              dob = values['dob']

Ø              caste = values['caste']

Ø              gender = values['gender']

Ø              sql = "INSERT INTO student (Sr_No, First_Name, Last_Name, Fathers_Name, Class, Number, DOB, Caste, Gender) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)"

Ø              val = (sr_no, first_name, last_name, fathers_name, class_, number, dob, caste, gender)

Ø              mycursor.execute(sql, val)

Ø              mydb.commit()

Ø              messagebox.showinfo("Student info", "Information stored successfully")

Ø              break

Ø          if event == 'Update':

Ø              # Update the student information in MySQL

Ø              update_info()

Ø          if event == 'Delete':

Ø              # Delete the student information from MySQL

Ø              delete_info()

Ø          if event == 'Clear':

Ø              # Clear the input boxes

Ø              clear_info()

Ø          if event == sg.WIN_CLOSED:

Ø              break

Ø   

Ø      window.close()

Ø 

Ø  root = tk.Tk()

Ø   

Ø  ascii_banner = pyfiglet.figlet_format("Swami Vivekanand  \nGovt.Model\nSchool")

Ø   

Ø  smiley = tk.Label(root, text=ascii_banner, font=("Courier", 10))

Ø  smiley.pack()

Ø  # Load and resize the logo image

Ø  logo = Image.open("svgms_logo.png")

Ø  logo = logo.resize((100, 100))

Ø  logo = ImageTk.PhotoImage(logo)

Ø   

Ø  # Display the logo image on the bottom right corner

Ø  logo_label = tk.Label(root, image=logo)

Ø  logo_label.place(relx=1, rely=1, anchor="se")

Ø   

Ø  username = tk.StringVar()

Ø  password = tk.StringVar()

Ø   

Ø  # Use ttkbootstrap widgets instead of tkinter ones

Ø  username_label = ttk.Label(root, text='Username')

Ø  username_label.pack()

Ø   

Ø  username_entry = ttk.Entry(root, textvariable=username)

Ø  username_entry.pack()

Ø   

Ø  password_label = ttk.Label(root, text='Password')

Ø  password_label.pack()

Ø   

Ø  password_entry = ttk.Entry(root, textvariable=password, show='*')

Ø  password_entry.pack()

Ø   

Ø  # Use a different style for the button

Ø  submit_button = ttk.Button(root, text='Login', command=check_login, style='success.Outline.TButton')

Ø  submit_button.pack()

Ø   

Ø  def display_data():

Ø      # Fetch login data

Ø      mycursor.execute("SELECT * FROM login")

Ø      login_data = mycursor.fetchall()

Ø      login_text = "\n".join([str(row) for row in login_data])

Ø   

Ø      # Fetch student data

Ø      mycursor.execute("SELECT * FROM student")

Ø      student_data = mycursor.fetchall()

Ø      student_text = "\n".join([str(row) for row in student_data])

Ø   

Ø      # Display data

Ø      messagebox.showinfo("Login Data", login_text)

Ø      messagebox.showinfo("Student Data", student_text)

Ø   

Ø  display_button = tk.Button(root, text='Display Data', command=display_data)

Ø  display_button.pack()

Ø   

Ø  root.mainloop()

Ø   

 

 

 

 

 

 

 

 

 

 

Ø     DELETE FORM DETAIL

Ø  import mysql.connector

Ø  from mysql.connector import Error

Ø  from tkinter import *

Ø   

Ø  def delete_data(sr_no):

Ø      try:

Ø          connection = mysql.connector.connect(host='localhost',

Ø                                               database='viditdb',

Ø                                               user='root',

Ø                                               password='vidit')

Ø   

Ø          cursor = connection.cursor()

Ø          sql_delete_query = """DELETE FROM student WHERE sr_no = %s"""

Ø          cursor.execute(sql_delete_query, (sr_no,))

Ø          connection.commit()

Ø   

Ø          print("Record deleted successfully")

Ø   

Ø      except mysql.connector.Error as error:

Ø          print("Failed to delete record: {}".format(error))

Ø   

Ø      finally:

Ø          if (connection.is_connected()):

Ø              cursor.close()

Ø              connection.close()

Ø   

Ø  def delete_student():

Ø      sr_no = entry.get()

Ø      delete_data(sr_no)

Ø   

Ø  root = Tk()

Ø  root.geometry('300x200')

Ø   

Ø  label = Label(root, text="Enter Sr No of student to delete")

Ø  label.pack()

Ø   

Ø  entry = Entry(root)

Ø  entry.pack()

Ø   

Ø  button = Button(root, text="Delete Student", command=delete_student)

Ø  button.pack()

Ø   

Ø  root.mainloop()

Ø   

 

Result: -)

o Sign_up Form

 






 


 

o Login form






Login data save in save on login.csv file


 





 

 


 

 

o Data store in mysql database

 

 

 

o Python shell ask to student detail or delete

 

 

For download the codes link given below:

https://vscorporation.blogspot.com/  by ViditShringi


Comments

Popular Posts