CS - Project 2022-23 (Manoj.l)
CS - Project 2022-23 (Manoj.l)
CS - Project 2022-23 (Manoj.l)
PROJECT REPORT ON
NAME : MANOJ.L
ROLL NO :
CLASS : XII
0
KMC PUBLIC
SENIOR SECONDARY SCHOOL (CBSE)
Perumanallur, Tirupur.
CERTIFICATE
down in the regulations of CBSE for the purpose of Practical Examination in Class
Tirupur on…………………….
1
ACKNOWLEDGEMENT
I offer sincere thanks to my friends who helped us to carry out this project work
successfully and for their valuable advice and support, which I received from them time
to time.
2
CONTENTS
1 ABSTRACT 1
2 INTRODUCTION 2
3 SYSTEM REQUIREMENTS 6
5 MODULES PURPOSESCODING 8
6 RESULTS 23
7 BIBLIOGRAPHY 35
3
1. ABSTRACT
The Project 'Industrial Gate Management System' is to record the details and various
activities of the user. It simplifies the task and reduces the paperwork. In this project, we are
reducing the paperwork which is done by giving the paper gate pass. We are providing the
electronic version of the paper gate pass. We provide appropriate training to the user which
suit their specific support has been provided at key points within the academic calendar.
Admin is monitoring all the user and system.
In this project, the only faculty is approving the user gate application if they want to
allow student then gate pass system is a pop-up on the guard system database. Training has
been provided timely basis and they got trained as the Gatepass System is new and rolled out
to their area of responsibility. At the moment we are in the very early stages, so it is dificult
to put a specific time on the training, but we will keep people informed as plans are
developed.
The system is very user-friendly and it is anticipated that functions of the system are
easily accessed by administrators, Faculties, students, and applicants.
1
2. INTRODUCTION
2.1 PYTHON:
Python was conceived in the late 1980s as a successor to the ABC language. Python
2.0, released in 2000, introduced features like list comprehensions and a garbage collection
system capable of collecting reference cycles. Python 3.0, released in 2008, was a major
revision of the language that is not completely backward-compatible, and much Python 2
code does not run unmodified on Python 3.
Python Features:
Easy-to-learn − Python has few keywords, simple structure, and a clearly defined syntax.
This allows the student to pick up the language quickly.
Easy-to-read − Python code is more clearly defined and visible to the eyes.
A broad standard library − Python's bulk of the library is very portable and cross- platform
compatible on UNIX, Windows, and Macintosh.
Interactive Mode − Python has support for an interactive mode which allows interactive
testing and debugging of snippets of code.
2
Portable − Python can run on a wide variety of hardware platforms and has the same
interface on all platforms.
Extendable − you can add low-level modules to the Python interpreter. These modules
enable programmers to add to or customize their tools to be more efficient.
GUI Programming − Python supports GUI applications that can be created and ported to
many system calls, libraries and windows systems, such as Windows MFC, Macintosh, and
the X Window system of Unix.
Scalable − Python provides a better structure and support for large programs than shell
scripting.
Tkinter − Tkinter is the Python interface to the Tk GUI toolkit shipped with Python. We
would look this option in this chapter.
JPython − JPython is a Python port for Java which gives Python scripts seamless access to
Java class libraries on the local machine
3
2.2 OVERVIEW OF PYTHON MODULES:
Numpy Numpy is the core library for scientific computing in Python. It provides a
high-performance multidimensional array object, and tools for working
with these arrays.
csv Python provides a CSV module to handle CSV files. To read/write data,
you need to loop through rows of the CSV
datetime The datetime module supplies classes for manipulating dates and times in
both simple and complex ways.
4
2.3 MYSQL:
MySQL is currently the most popular open source database software. It is a multiuser,
multithreaded database management system. MySQL is especially popular on the web. It is
one of the parts of the very popular LAMP platform. Linux, Apache, MySQL and PHP or
WIMP platform Windows, Apache, MySQL and PHP. MySQL AB was founded by Michael
Widenius (Monty), David Axmark and Allan Larsson in Sweden in year 1995.
Features of MySQL:
Open Source & Free of Cost: It is Open Source and available at free of cost.
Portability: Small enough in size to install and run it on any types of Hardware and OS like
Linux, MS Windows or Mac etc.
Query Language: It supports SQL (Structured Query Language) for handling database.
5
3. SYSTEM REQUIREMENTS
Windows OS
Python 3.10
MY SQL 5.5
6
4. OBJECTIVES OF THE PROJECT
Objectives which will increase the effectiveness of Gate Pass Management System is as
follows:
The main objective is to implement an automated system that will be used to manage
Gate Pass for material, employees and visitors more accurately, with the aim of minimizing
human intervention by replacing the current manual process.
To establish a system which will align with other automated systems to increase the
traceability and compliance of records, to the requirements of the organization.
7
5.MODULES PURPOSES AND CODING
DATETIME
MYSQL CONNECTOR
DATETIME:
In Python, date and time are not a data type of their own, but a module
named datetime can be imported to work with the date as well as time. Python Datetime
module comes built into Python, so there is no need to install it externally.
Python Datetime module supplies classes to work with date and time. These classes
provide a number of functions to deal with dates, times and time intervals. Date and datetime
are an object in Python, so when you manipulate them, you are actually manipulating objects
and not string or timestamps. Its a combination of date and time along with the attributes
year, month, day, hour, minute, second, microsecond, and tzinfo.
MYSQL CONNECTOR:
8
5.2 SOURCE CODE :
import datetime
import mysql.connector as sq
def date_time():
return datetime.datetime.now()
def sql_emp(N,C,T,D):
cur = data.cursor()
#if data.is_connected():
#print('connected sucessfully')
val = (N,C,T,D)
cur.execute(q,val)
data.commit()
data.close()
def sql_update(Sr):
data =
sq.connect(host='localhost',user='MANOJ',password='mysqlmanoj1234',database='employee
')
9
cur = data.cursor()
i = int(input('enter number'))
if i == 1:
n = input('ENTER NAME')
data.commit()
elif i == 2:
n1 = int(input("enter code"))
data.commit()
elif i == 3:
n2 = input("enter department")
data.commit()
elif i == 4:
n3 = input("enter name")
n4 = int(input("enter emp_code"))
10
n5 = input("enter department")
data.commit()
data.close()
def sql_vehicle(VN,DN,T,M):
cur = data.cursor()
q = "INSERT INTO
vehicle_entry(VEHICLE_NUMBER,DRIVER_NAME,TIME,MATERIAL)
VALUES(%s,%s,%s,%s)"
val = (VN,DN,T,M)
cur.execute(q,val)
data.commit()
data.close()
def sql_vehupdate(veh_Sr):
cur = data.cursor()
print(
11
'WHAT DO YOU WANT TO CHANGE \n PRESS 1 FOR VEHICLE NUMBER'
' \n PRESS 2 FOR DRIVER NAME \n PRESS 3 FOR MATERIAL \n PRESS 4 FOR
LAST ENTERED DATA TO CHANGE')
i = int(input('enter number'))
if i == 1:
data.commit()
elif i == 2:
data.commit()
elif i == 3:
n2 = input("enter material")
data.commit()
elif i == 4:
12
n5 = input("enter material")
data.commit()
data.close()
def sql_visitor(N,T,MN,R):
cur = data.cursor()
val = (N,T,MN,R)
cur.execute(q,val)
data.commit()
data.close()
def sql_residental(N,T,H):
cur = data.cursor()
13
val = (N,T,H)
cur.execute(q,val)
data.commit()
data.close()
def sql_residentalupdate(res_Sr):
cur = data.cursor()
print(
' \n PRESS 2 FOR HOUSE NUMBER \n PRESS 3 FOR LAST ENTERED DATA TO
CHANGE')
i = int(input("enter number"))
if i == 1:
n = input('ENTER NAME')
data.commit()
elif i == 2:
14
data.commit()
elif i == 3:
n3 = input("enter NAME")
cur.execute(
n3,n4,res_Sr))
data.commit()
data.close()
def employee():
data =
sq.connect(host='localhost',user='MANOJ',password='mysqlmanoj1234',database='employee
')
cur = data.cursor()
dat = cur.fetchall()
for i in dat:
print(i)
if rr == 'Y' or rr == 'y':
15
print('which employee data you want to change')
change_emp(rr)
def change_emp(rr):
cur = data.cursor()
n3 = input('enter department::')
data.commit()
i = True
while i:
t = input('enter::')
if t == 'Y' or t == 'y':
na = input('enter name::')
16
change_emp(na)
else:
i = False
def vechicle():
data =
sq.connect(host='localhost',user='MANOJ',password='mysqlmanoj1234',database='vehicle_e
ntry')
cur = data.cursor()
dat = cur.fetchall()
print('\n')
for i in dat:
print(i)
def residental():
data =
sq.connect(host='localhost',user='MANOJ',password='mysqlmanoj1234',database='residental
_entry')
cur = data.cursor()
17
dat = cur.fetchall()
for i in dat:
print(i)
def visitor():
data =
sq.connect(host='localhost',user='MANOJ',password='mysqlmanoj1234',database='visitor_en
try')
cur = data.cursor()
dat = cur.fetchall()
for i in dat:
print(i)
k = True
while k:
t = date_time()
sql_emp(n,c,t,d)
print("IF YOU WANT TO CHANGE LAST ENTERED DATA PRESS Y/y else
N/n=")
i2 = input('enter Y/y')
if i2 == 'y' or i2 == 'Y':
sql_update(n)
if K1 == 'Y' or K1 == 'y':
k = True
19
else:
k = False
else:
pass
vt = date_time()
sql_vechicle(vn,dn,vt,ma)
i3 = input('enter Y/y')
if i3 == 'Y' or i3 == 'y':
sql_vehupdate(vn)
rt = date_time()
sql_residental(rn,rt,hn)
20
print(f"DATA SUCCESSFULLY ENTERED OF REDANTIAL SERIAL NUMBER:\n
NAME: {rn}")
i4 = input('enter Y/y')
sql_residentalupdate(rn)
vt = date_time()
sql_visitor(vn,vt,vm,vr)
print(' ')
21
print("ENTER 4 TO RETRIEVE RESIDENTAL DATA")
r1 = input('enter number')
if r1 == '1':
employee()
elif r1 == '2':
vehicle()
elif r1 == '3':
visitor()
elif r1 == '4':
residental()
22
6.RESULTS
EMPLOYEE_ENTRY:
EMPLOYEE_ENTRY :
23
EMPLOYEE_ENTRY :
EMPLOYEE_ENTRY :
24
RETRIVING DATA FROM EMPLOYEE_ENTRY :
TABLE :
25
VEHICLE_ENTRY :
VEHICLE_ENTRY :
26
VEHICLE_ENTRY :
VEHICLE_ENTRY :
27
RETRIVING DATA FROM VEHICLE_ENTRY :
TABLE :
28
VISITOR_ENTRY :
VISITOR_ENTRY :
29
VISITOR_ENTRY :
VISIITOR_ENTRY :
30
RETRIVING DATA FROM VISITOR_ENTRY :
TABLE :
31
RESIDENTAL_ENTRY :
RESIDENTAL_ENTRY :
32
RESIDENTAL_ENTRY :
RESIDENTAL_ENTRY :
33
RETRIVING DATA FROM RESIDENTAL_ENTRY :
TABLE :
34
7.BIBILIOGRAPHY
https://www.ssgopalganj.in
https://www.w3schools.com/python
https://www.wikipedia.org
https://github.com
https://www.tutorialspoint.com
https://www.w3resource.com
35