0% found this document useful (0 votes)
321 views

Library Management System: School Logo

This document is a project file for a Library Management System created by a student. It includes sections describing the aim of creating a software to manage library functions electronically. It lists objectives like making operations simple, increasing efficiency, and reducing costs. It also includes documentation of the coding, hardware and software requirements, and limitations of the initial project version. The project involves coding a library management system in Python using Pandas and Matplotlib libraries to manage data in CSV files for books, members, and transactions.

Uploaded by

Pranav Choudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
321 views

Library Management System: School Logo

This document is a project file for a Library Management System created by a student. It includes sections describing the aim of creating a software to manage library functions electronically. It lists objectives like making operations simple, increasing efficiency, and reducing costs. It also includes documentation of the coding, hardware and software requirements, and limitations of the initial project version. The project involves coding a library management system in Python using Pandas and Matplotlib libraries to manage data in CSV files for books, members, and transactions.

Uploaded by

Pranav Choudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

LIBRARY MANAGEMENT

SYSTEM

SCHOOL LOGO

PROJECT FILE
INFORMATICS PRACTICES-065
SESSION : 2021-22

NAME : ______________________
CLASS : XII
AISSCE ROLL NO. :
CERTIFICATE
This is to certify that ___________________
Roll No. of Class : XII
Session : 2021-22
Has prepared the Project file on the topic.
“LIBRARY MANAGEMENT SYSTEM”
As per he prescribed syllabus of
INFORMATICS PRACTICES (065) CLASS XII
(C.B.S.E.)
Under my supervision, I am completely satisfied by his
performance.
I wish him all the success in life.

Principal’s Subject Teacher’s

Signature Signature
____________________
External’s Signature
ACKNOWLWDGEMENT
Apart from the effort of me, the success of any project
depends largely on the encouragenment and
guidelines of many others. We take this opportunity to
express our gratitude to the people who have been
instrumental in the successful completion of this
project.
We would like to express my special thanks of
gratitude to our Informatics Practices teacher
“_____________________” for their guidance and
support in completion of this project.
We would like to extend our gratitude to the
PRINCIPAL “_______________” for providing us
with all the facilities that was required.

Date:
Name: __________________
Roll No.:
Class: XII
AIM : To Develop Library Management System
Title: Library Management System
Problem Definition:
Develop a software named Library Management System to
manage manual functions of a library. The software should helps to
manage the entire library operations from maintaining book records to
issue a book. In addition, it should allows streamlined management of
fine details of books such as author name, costing, number of copies
existing in the library and many other important details. Make it easier
to search for books and find the right materials for students and the
librarian instantly.
reason for choosing the topic:
 To reduce the manual work to manage library functions.
 To Save time and reduced overheads.
 To increase Librarian's efficiencies.
 To remove manual processes in the Library.
 To perform day to day library operations electronically.
Objectives:
The library management system is designed to meet the following
objectives:
 Simple and easy to operate
 Increase librarian’s efficiencies
 Search, add, update, and view library materials
 Helps to manage library functions constructively
 Saves time and reduces overheads
 Reduce library’s operating cost
 Customized reports for better management
 Remove manual processes to issue books and maintain records
TEAM-MATES AND
THEIR CONTRIBUTION

1) Student-1 Name
Responsibility: CSV FILE Creation and
Documentation

2) Student-2 Name
Responsibility: Functions Coding and ScreenShots

3) Student-3 Name
Responsibility: Main Coding , Synopsis and
Documentation
Introduction to LMS version 1.00?
LMS is also called an automated library system. It is
defined as software that has been established to manage
basic housekeeping function of a library.
The electronic management via the software is essential to track
information like issue date, due date, who has borrowed any book etc.
The system is developed and designed with an aim to facilitate efficient
management to the schools to manage a modern library with accurate
data management. The software is intended to reduce the manual work
to manage library functions which have various features.

FUNCTIONS OF THIS LMS:


In order to maintain library management software, LMS has the
following set of components. These components are efficient to manage
library operations accurately.

Add and update books: LMS can add new books or other materials to
the system with the essential details by generating the id of the books
automatically. Thus, the librarian can maintain the system effectively.
Add and update members: LMS can add new members or and edit the
detail of existing members of the library who have the membership of
the Library.
Search option: Librarian can search for library books/materials. He
/She can search for books and members of the Library.
Transaction : Transaction like issue and return of books can be done
any time by the existing members of the Library.
Fine calculator : The Librarian can view the issued materials with their
due date. And, if any book is overdue, the system will allow calculating
fine for the same.
Visualization: Various type of graphs and charts can be viewed from
LMS for various data set, and understand ability can be enhanced very
quickly.

IMPORTANCE OF A LMS IN SCHOOL EDUCATION


Library management systems facilitate the administrators to keep an
eye on the library department’s all functions. Also, it enables librarians
and users to save time on daunting tasks and enhances efficiency. By
using this sort of library management system, the school management
would be able to follow the work outline and fineness of different
librarians capabilities. Additionally, they get an opportunity to know
how well-maintained the record of issued books and collection is. The
librarian and the administration department can access various reports to
implement new improvements.
Thus, the efficient library management software is essential to run smart
school functions, and maintain accurate data of a library.
LIMITATIONS OF OUR PROJECT:

1- Hard copy of any report cannot be printed


2- Different login platforms for administrators,
students and parents is missing
3- User ID and Password control is missing
4- Online and remote operation is missing
5- Internet and cloud based database is missing
HARDWARE AND SOFTWARE REQUIREMENT
Hardware Requirements:
 A computer or laptop with operating system:-
windows 7 or above
 x86 64-bit CPU (Intel / AMD architecture)
 4 GB RAM
 5 GB free disk space.
Software Requirements:
 Python 3.6.x or higher version
 Pandas library preinstalled
 Matplotlib library preinstalled
 Ms-Office Pre-installed for documentation
OPERATING SYSTEM

Windows 7.0 Onwards

Windows 7 is a major release of the Windows NT


operating system developed by Microsoft. It was
released to manufacturing on July 22, 2009, and
became generally available on October 22, 2009. It is
the successor to Windows Vista, released nearly three
years earlier
OVERVIEW OF PYTHON 3.7 (32 BIT)

Python is an interpreter, object-oriented, high-level


programming language with dynamic semantics. It
was developed by Guido Van Rossum.
Its high-level built in data structures, combined with
dynamic typing and dynamic binding; make it very
attractive for Rapid Application Development, as well
as for use as a scripting or glue language to connect
existing components together.
Python's simple, easy to learn syntax emphasizes
readability and therefore reduces the cost of program
maintenance. Python supports modules and packages,
which encourages program modularity and code
reuse.
PYTHON LIBRARY - PYTHON PANDAS:

Pandas is a Python library for data analysis. Started


by Wes McKinney in 2008 out of a need for a
powerful and flexible quantitative analysis tool,
pandas has grown into one of the most popular
Python libraries. It has an extremely
active community of contributors.
Pandas is built on top of two core Python libraries—
matplotlib for data visualization and NumPy for
mathematical operations. Pandas acts as a wrapper
over these libraries, allowing you to access many of
matplotlib's and NumPy's methods with less code. For
instance, pandas' .plot() combines multiple matplotlib
methods into a single method, enabling you to plot a
chart in a few lines.
Before pandas, most analysts used Python for data
munging and preparation, and then switched to a
more domain specific language like R for the rest of
their workflow. Pandas introduced two new types
of objects for storing data that make analytical tasks
easier and eliminate the need to switch tools: Series,
which have a list-like structure, and Data Frames,
which have a tabular structure.
PYTHON LIBRARY -MATPLOTLIB

Matplotlib is an amazing visualization library in


Python for 2D plots of arrays. Matplotlib is a multi-
platform data visualization library built on NumPy
arrays and designed to work with the broader SciPy
stack. It was introduced by John Hunter in the year
2002.
One of the greatest benefits of visualization is that it
allows us visual access to huge amounts of data in
easily digestible visuals. Matplotlib consists of several
plots like line, bar, scatter, histogram etc.
Matplotlib comes with a wide variety of plots. Plots
help to understand trends, patterns, and to make
correlations. They’re typically instruments for
reasoning about quantitative information.
CSV FILE:-
A comma-separated values file is a delimited text file
that uses a comma to separate values. Each line of the
file is a data record. Each record consists of one or
more fields, separated by commas. The use of the
comma as a field separator is the source of the name
for this file format.
CSV FILES USED IN LMS:

BOOKS.CSV

MEMBERS.CSV
TRANSACTION.CSV
CODING:

# To develop Library Management System ( LMS Version 1.00 )


import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
global path
from datetime import date
import time
import winsound
import pyttsx3 as ply
pd.set_option('display.max_columns',None)
path="C:\\Users\\pc\\Desktop\\Library\\"
#path=input("Please enter the csv file path: ")
def menu():
while True:
print("LMS Version 1.00 By: Computer Concepts: A K Pandey")
print(" LIBRARY MANAGEMENT SYSTEM")
print(" PUBLIC L I B R A R Y")
print(" *****************************")
print()
print(" 1- BOOKS")
print(" 2- MEMBERS")
print(" 3- TRANSACTION")
print(" 4- VISUALIZATION")
print(" 5- ANALYTICS/QUERY")
print(" 6- E X I T")
ch=int(input(" Enter your choice [1-6] :"))
if ch==1:
books()
elif ch==2:
members()
elif ch==3:
transaction()
elif ch==4:
visualization()
elif ch==5:
analytics()
else:
s=ply.init()
s.setProperty('rate',145)
s.say("THANK YOU VERY MUCH FOR USING LIBRARY
MANAGEMENT SYSTEM. I AM EXITING. PLEASE VISIT AGAIN")
s.runAndWait()
str="THANK YOU VERY MUCH FOR USING LIBRARY
MANAGEMENT SYSTEM. EXITING....."
for k in str:
print(k,end='')
time.sleep(0.1)
break
#*******************************************************************
def books():
while True:
print(" B O O K S M E N U")
print(" **********************")
print()
print(" 1- Add New Books")
print(" 2- Delete old Books")
print(" 3- Edit detail of the Books")
print(" 4- B A C K")
ch=int(input(" Enter your choice [1-4] :"))
if ch==1:
add_book()
elif ch==2:
del_book()
elif ch==3:
edit_book()
else:
print("Going back to Main Menu")
break

#*******************************************************************
def members():
while True:
print(" M E M B E R S M E N U")
print(" *************************")
print()
print(" 1- Add Members")
print(" 2- Delete Members")
print(" 3- Edit detail of the Memebers")
print(" 4- B A C K")
ch=int(input(" Enter your choice [1-4] :"))
if ch==1:
add_member()
elif ch==2:
del_member()
elif ch==3:
edit_member()
else:
print("Going back to Main Menu")
break

#*******************************************************************
def transaction():
dftrans=pd.read_csv(path+"transaction.csv")
print(dftrans)
while True:
print(" TRANSACTION M E N U")
print(" **********************************")
print()
print(" 1- Issue a Book")
print(" 2- Return a Book")
print(" 3- B A C K")
ch=int(input(" Enter your choice [1-3] :"))
if ch==1:
issue_book()
elif ch==2:
return_book()
else:
print("Going back to Main Menu")
break

#*************************************************
def add_book():
dfbooks=pd.read_csv(path+"books.csv")
ans='y'
bid=0
while ans=='y' or ans=='Y':
df=dfbooks.sort_values(by='Book_id')
df=df.tail(1)
bid=df.iloc[0,0]+1
#bid=int(input("Enter Book id :"))
print("New Book id : ",bid)
bnm=input("Enter Book Name :")
auth=input("Enter Author Name :")
price=float(input("Enter Price :"))
dt_enter=input("Enter Date of Entry :")
cpy=int(input("Enter No. of copies:"))
data=[bid,bnm,auth,price,dt_enter,cpy]
dfbooks.loc[len(dfbooks)]=data
dfbooks.to_csv(path+"books.csv",index=False)
print("A New Books added Successfully....")
ans=input("Do you want to add more books?")
print(dfbooks)

#****************************************
def del_book():
dfbooks=pd.read_csv(path+"books.csv")
ans='y'
bid=0
while ans=='y' or ans=='Y':
bid=int(input("Enter Book id :"))
if bid in dfbooks['Book_id'].values:
response=input("Do you really want to remove this book from
Library(Y/N)?")
if response=='y' or response=='Y':

dfbooks.drop(dfbooks[dfbooks['Book_id']==bid].index,inplace=True)
print("Book id -",bid,"has been deleted successfully...")
else:
print("Book is not found...")

dfbooks.to_csv(path+"books.csv",index=False)
ans=input("Do you want to delete more books?")
print(dfbooks)

def edit_book():
dfbooks=pd.read_csv(path+"books.csv")
print(dfbooks)
ans='y'
bid=0
while ans=='y' or ans=='Y':
bid=int(input("Enter Book id :"))
if bid in dfbooks['Book_id'].values:
nm=input("Enter the column name to change: ")
val1=eval(input("Enter it's value: if string in quotes(''): "))
dfbooks.loc[(dfbooks['Book_id'] == bid),nm]=val1
print("Book id -",bid,"has been updated successfully...")
print(dfbooks.loc[dfbooks['Book_id']==bid])

else:
print("Book is not found...")

dfbooks.to_csv(path+"books.csv",index=False)
ans=input("Do you want to edit more books?")
print(dfbooks)

#*************************************************
def add_member():
dfmembers=pd.read_csv(path+"members.csv")
ans='y'
mid=0
while ans=='y' or ans=='Y':
df=dfmembers.sort_values(by='Member_id')
df=df.tail(1)
mid=df.iloc[0,0]+1
print("New Member id : ",mid)
mem_nam=input("Enter Member Name :")
age=int(input("Enter Age :"))
phno=int(input("Enter Contact :"))
addr=input("Enter Address :")
mship=input("Enter Membership Status (Y/N) :")
iss_st='N'
data=[mid,mem_nam,age,phno,addr,mship,iss_st]
dfmembers.loc[len(dfmembers)]=data
dfmembers.to_csv(path+"members.csv",index=False)
print("A New Member added Successfully....")
ans=input("Do you want to add more Members?")
print(dfmembers)

def del_member():
dfmembers=pd.read_csv(path+"members.csv")
ans='y'
mid=0
while ans=='y' or ans=='Y':
mid=int(input("Enter Member id :"))
if mid in dfmembers['Member_id'].values:

print(dfmembers.loc[dfmembers.Member_id==mid,['Member_name','Age']])
ans=input("Do you want to really delete it(Y/N)")
if ans=='y' or ans=='Y':
dfmembers.drop(dfmembers[dfmembers['Member_id']==mid].index,inplace=
True)
print("Member id -",mid,"has been deleted successfully...")
else:
print("Member is not found...")

dfmembers.to_csv(path+"members.csv",index=False)
ans=input("Do you want to delete more members?")
print(dfmembers)

#*********************************************************
def edit_member():
dfmembers=pd.read_csv(path+"members.csv")
print(dfmembers)
ans='y'
mid=0
while ans=='y' or ans=='Y':
mid=int(input("Enter Member id :"))
if mid in dfmembers['Member_id'].values:
nm=input("Enter the column name to change: ")
val1=eval(input("Enter it's value: if string in quotes(''): "))
dfmembers.loc[(dfmembers['Member_id'] == mid),nm]=val1
print("Member id -",mid,"has been updated successfully...")
print(dfmembers.loc[dfmembers['Member_id']==mid])

else:
print("Member is not found...")
dfmembers.to_csv(path+"members.csv",index=False)
ans=input("Do you want to edit more Members?")
print(dfmembers)

#**********************************************************
def issue_book():
dfbooks=pd.read_csv(path+"books.csv")
dfmembers=pd.read_csv(path+"members.csv")
dftrans=pd.read_csv(path+"transaction.csv")
ans='y'
while ans=='y' or ans=='Y':
mid=int(input("Enter Member id: "))
bid=int(input("Enter Book id to be issued: "))
if mid in dfmembers['Member_id'].values:

print(dfmembers.loc[dfmembers.Member_id==mid,['Member_name','Age']])
mship=dfmembers.loc[dfmembers['Member_id'] == mid,
'Membership'].values[0]
istatus=dfmembers.loc[dfmembers['Member_id'] == mid,
'Issu_status'].values[0]
if (mship=='y' or mship=='Y') and (istatus=='n' or istatus=='N'):
if bid in dfbooks['Book_id'].values:
print(dfbooks.loc[dfbooks.Book_id==bid,['Bname','Copies']])
cpy=dfbooks.loc[dfbooks['Book_id'] == bid, 'Copies'].values[0]
if cpy>0:
dt_iss=input("Please Enter date of Issue(dd/mm/yyyy): ")
data=[mid,bid,dt_iss,np.NaN]
dftrans.loc[len(dftrans)]=data
dfmembers.loc[dfmembers.Member_id == mid,
'Issu_status']='Y'
dfbooks.loc[dfbooks.Book_id == bid, 'Copies']-=1
print("Book Issued Successfully...")
else:
print("Sorry ! No. of copy is insufficent in the Library..")
else:
print("Book is not found...")
else:
print("Sorry! Membership Expired!! or 1-Book Already issued. First
return it..")
else:
print("Member is not found...")

dftrans.to_csv(path+"transaction.csv",index=False)
dfbooks.to_csv(path+"books.csv",index=False)
dfmembers.to_csv(path+"members.csv",index=False)
ans=input("Do you want to issue more books?")
print(dftrans)

#**********************************************************
def return_book():
dfbooks=pd.read_csv(path+"books.csv")
dfmembers=pd.read_csv(path+"members.csv")
dftrans=pd.read_csv(path+"transaction.csv")
ans='y'
while ans=='y' or ans=='Y':
mid=int(input("Enter Member id: "))
if mid in dftrans['Member_id'].values:
dt_is=input("Date of Issue: ")
dt_rtn=input("Enter Date of Return: ")
bid=dftrans.loc[(dftrans['Member_id'] == mid) & (dftrans['dt_issue']
== dt_is ), 'Book_id'].values[0]
cond=(dfmembers.Member_id==mid) &
(dfmembers.Issu_status=='Y')
if cond.any():
dftrans.loc[(dftrans['Member_id'] == mid) & (dftrans['dt_issue'] ==
dt_is ), 'dt_return']=dt_rtn
dfmembers.loc[dfmembers.Member_id == mid, 'Issu_status']='N'
dfbooks.loc[dfbooks.Book_id == bid, 'Copies']+=1
# Calculating Fine
yyr=int(dt_rtn[6:])
mmr=int(dt_rtn[3:5])
ddr=int(dt_rtn[:2])

yyi=int(dt_is[6:])
mmi=int(dt_is[3:5])
ddi=int(dt_is[:2])

d0 = date(yyi, mmi, ddi)


d1 = date(yyr, mmr, ddr)
delta = d1 - d0
n=delta.days
if n>7:
fine=(n-7)*10.00
else:
fine=0.00
print("Please Pay Fine Rs.",fine)
print("Book Returned Successfully...")
else:
print("The book is already returned.. Action denied")
else:
print("Member is not found...")

dftrans.to_csv(path+"transaction.csv",index=False)
dfbooks.to_csv(path+"books.csv",index=False)
dfmembers.to_csv(path+"members.csv",index=False)
ans=input("Do you want to Return more books?")
print(dftrans)

#***********************************************************
def analytics():
dfbooks=pd.read_csv(path+"books.csv")
dfmembers=pd.read_csv(path+"members.csv")
dftrans=pd.read_csv(path+"transaction.csv")
while True:
print(" A N A L Y S I S M E N U")
print(" ***************************")
print()
print(" 1- All Books")
print(" 2- All Members")
print(" 3- Search Books (Code wise)")
print(" 4- Search Books (Name wise)")
print(" 5- Search Member ( Code wise)")
print(" 6- Search Member (Name wise)")
print(" 7- Books issued (Date wise)")
print(" 8- Back to Main Menu")
ch=int(input(" Enter your choice [1-8] :"))
if ch==1:
print(dfbooks)
elif ch==2:
print(dfmembers)
elif ch==3:
bcode=int(input("Please Enter Book ID: "))
print(dfbooks.loc[dfbooks.Book_id==bcode])
elif ch==4:
bnm=input("Please Enter Book Name: ")
length=len(dfbooks)
for i in range(length):
if bnm in dfbooks.Bname[i]:
print(dfbooks.Book_id[i],"--->",dfbooks.Bname[i])
elif ch==5:
mid=int(input("Please Enter Member ID: "))
print(dfmembers.loc[dfmembers.Member_id==mid])
elif ch==6:
m_nm=input("Please Enter Member Namee: ")
length=len(dfmembers)
for i in range(length):
if m_nm in dfmembers.Member_name[i]:
print(dfmembers.Member_id[i],"--
>",dfmembers.Member_name[i],"-->",dfmembers.Contact[i])
elif ch==7:
dt_iss=input("Please Enter Date of Issue: ")
print(dftrans.loc[dftrans.dt_issue==dt_iss])
else:
print("Going back to Main Menu")
break

#***********************************************************
def visualization():
dfbooks=pd.read_csv(path+"books.csv")
dfmembers=pd.read_csv(path+"members.csv")
dftrans=pd.read_csv(path+"transaction.csv")
while True:
print(" V I S U A L I Z A T I O N M E N U")
print(" *************************************")
print()
print(" 1- No. of Copies Balanced in the Library")
print(" 2- Members Age ( Specific Group)")
print(" 3- The Books Popularity")
print(" 4- Back to Main Menu")
ch=int(input(" Enter your choice [1-4] :"))
if ch==1:
typ=input("Graph Type [Line-L,Bar-B]:")
if typ=='L':
x1=dfbooks.Bname
y1=dfbooks.Copies
n=np.arange(len(dfbooks))
plt.plot(n, y1,color='m', linestyle='-.',linewidth=2,marker='o')
plt.xticks(n,x1,rotation=25)
elif typ=='B':
dfbooks.plot('Bname','Copies', kind='bar', color='r',rot=20)
plt.title("Plot: Book Name vs Copies",fontsize=16,color='r')
plt.xlabel("Book Name-->",fontsize=12,color='m')
plt.ylabel("No.of Copies-->",fontsize=12,color='m')
plt.grid()
plt.show()
elif ch==2:
typ=input("Graph Type [Line-L,Bar-B]:")
if typ=='L':
x1=dfmembers.Member_name
y1=dfmembers.Age
n=np.arange(len(dfmembers))
plt.plot(n, y1,color='r', linestyle='-.',linewidth=2,marker='^')
plt.xticks(n,x1,rotation=25)

elif typ=='B':
dfmembers.plot('Member_name','Age', kind='bar',
color='m',rot=20)
plt.title("Plot: Member Name vs Age",fontsize=16,color='m')
plt.xlabel("Member Name-->",fontsize=12,color='b')
plt.ylabel("Age-->",fontsize=12,color='b')
plt.grid()
plt.show()
elif ch==3:
bid=list(dftrans.Book_id)
frequency = {}
for item in bid:
if item in frequency:
frequency[item] += 1
else:
frequency[item] = 1

df1=pd.DataFrame({'Book_id':list(frequency.keys()),'Rank':list(frequency.val
ues())})
df2=pd.merge(df1,dfbooks,on='Book_id')
print(df2)
x=df2.Bname
y=df2.Rank
plt.bar(x,y,color='g',width=0.60)
plt.title("Plot: Book no vs Popularity",fontsize=16,color='g')
plt.xlabel("Book ID-->",fontsize=12,color='b')
plt.ylabel("Reading Frequency-->",fontsize=12,color='b')
plt.grid()
plt.show()
elif ch==4:
print("Going back to Main Menu.....")
break

#***************************************
# Call Main Menu
#***************************************
menu()
#**************************************
OUTPUT:
BIBLIOGRAPHY:
We have successfully completed our project
with the help of our teachers and team
members. The different sources we have used
are:-
1. Wikipedia:-
https://www.wikipedia.org/

2. Youtube :-
https://www.youtube.com/

3. Text book-IP (Preeti Arora class 11,12)

4. Text book-IP ( NCERT Class 11,12)

You might also like