0% found this document useful (0 votes)
25 views21 pages

PWP Project

The document outlines a micro-project titled 'Library Management', which aims to create a Python-based Library Management System that utilizes file handling for efficient management of book records. The system will allow functionalities such as adding, viewing, deleting, and sorting books, while ensuring user-friendly interaction and data integrity. The project emphasizes practical applications of Python programming and aims to automate library operations without the need for complex databases.

Uploaded by

prarthana0530
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)
25 views21 pages

PWP Project

The document outlines a micro-project titled 'Library Management', which aims to create a Python-based Library Management System that utilizes file handling for efficient management of book records. The system will allow functionalities such as adding, viewing, deleting, and sorting books, while ensuring user-friendly interaction and data integrity. The project emphasizes practical applications of Python programming and aims to automate library operations without the need for complex databases.

Uploaded by

prarthana0530
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/ 21

Introduction

Title of the Micro-project :

“Library Management”

1. Brief Introduction:

In today's digital era, managing a library efficiently requires an organized system that can
handle book records, user data, and transactions seamlessly. This project aims to develop a
Python-based Library Management System that leverages file handling for data storage and
retrieval, ensuring a structured and user-friendly approach to library management. The system
will allow users to add new books, view the list of available books, delete records, and sort books
based on different criteria such as name or price. Additionally, it will include search functionality
to quickly find books based on their title or author name. By implementing error handling and
data validation, the system will maintain reliability and accuracy.
The project will be developed using Python’s built-in capabilities, utilizing file handling
techniques to store and manage book records persistently. Sorting and searching algorithms will
enhance data accessibility, providing an optimized user experience. This Library Management
System serves as a practical implementation of software development concepts, offering a
scalable and efficient solution for library administration while demonstrating the power of Python
in real-world applications.

2. Aims of Micro-project:

1. Automate Library Management – Develop a digital system to efficiently manage book


records, reducing manual effort and paperwork.
2. Enhance Book Organization – Provide functionalities to add, delete, update, and view
book details systematically.
3. Implement File-Based Data Storage – Utilize file handling in Python to store and
retrieve book data persistently without the need for a complex database.
4. Improve Data Accessibility – Enable sorting and searching of books based on different
criteria such as title, author, or price.
5. Ensure User-Friendly Interaction – Design a simple and intuitive interface for
librarians and users to manage books effortlessly.
6. Enhance Security and Data Integrity – Implement validation techniques to prevent
duplicate entries and maintain accurate records.
7. Develop a Scalable System – Create a flexible system that can be expanded with
additional features like issuing books, tracking borrowed books, and user authentication
in the future.
3. Action Plan:

Sr.no Details of Activity Planned Planned Name of


Start date Finish date Responsible Team
member

1. Discuss about Project. ALL MEMBERS

2. Finally Select the topic. ALL MEMBERS

3. Collect information of the ALL MEMBERS


project.

4. Collection of data. ALL MEMBERS

5. Discuss and outline of content. ALL MEMBERS

6. Formulation of content. ALL MEMBERS

7. Editing and Proof Reading of ALL MEMBERS


Content.

8. Compilation and Report ALL MEMBERS


Presentation.

9. Actual Presentation. ALL MEMBERS

10. Final Submission of Project. ALL MEMBERS


4. Resources Required:

Sr.No Name of Resources Specification Quantity

1. Desktop Computer Core i5 processor, 8GB RAM


1

2. Google site https://docs.python.org/3/tutorial/index.html 1

3. Laboratory manual of Computer Group Of Diploma Semester VI, 1


PWP MSBTE

5. Submitted By:

Sr.no Team Members Name Roll No. Sign

1. Kumbhar Prarthana Ganpati 21


Shree Mouni Vidyapeeth’s
Institute of Civil and Rural Engineering, Gargoti.
A
Micro Project Report
Under The Course
“Programming With Python” (22616)
With title

“ Library Management ”
Submitted by

Prarthana Ganpati Kumbhar

In Partial Fulfillment of

Diploma in Computer Engineering

Department of Computer Engineering


(2024-2025)
CERTIFICATE

This is to certify that the Micro project entitled “Library Management” under the course of
“Programming With Python” submitted to the Institute of Civil and Rural Engineering,
Gargoti in partial fulfilment of Diploma in Computer Engineering is a record of original work
done by Prarthana during the period from 2024 to 2025 under supervision and guidance
Mr V. S. Kalke , Lecturer in department of Computer Engineering.

Head of the Department Signature of the Guide


DECLARATION

I am Prarthana hereby, declares that the Micro Project submitted to the Institute of Civil
and Rural Engineering, Gargoti in partial fulfillment of Diploma in Computer Engineering
done in the period of 2024-2025 under the supervision and guidance of Mr. V. S. Kalke,
Lecturer in department of Computer Engineering. The project has not been copied with any
other candidate of any diploma college.

Place: Gargoti. Signature of the Candidate:


Date: Prarthana Kumbhar
INDEX

SR .NO TITLE

1. Rationale

2. Aims/benefits of Microproject

3. Course Outcomes addressed

4. Literature Review

5. Actual Methodology Followed

6. Actual Resources Used

7. Skill Developed

Submitted By

Exam Seat
Sr. No. Name Roll No. Enrollment No. Signature
Number

1. Prarthana Ganpati Kumbhar 21 2200120021


Micro-project Report
Course: Programming With Python (22616)
Project Title:
“Library Management”
1.0 Rationale
The rationale behind undertaking the Library Management System microproject is to
demonstrate the practical application of file handling in Python for efficiently managing book
records without relying on external databases. By utilizing text files, the project showcases
how data can be stored, retrieved, and manipulated dynamically, ensuring data persistence and
integrity. This approach eliminates the need for complex database management, making it a
lightweight yet effective solution for small-scale library operations. Additionally, the project
emphasizes efficient file handling techniques, such as reading, writing, appending, and
modifying data, while incorporating sorting and searching functionalities to enhance data
accessibility.

2.0 Aims/benefits of Microproject

a) It aims to develop an interactive and user-friendly system for managing library book
records efficiently.
b) It aims to utilize Python’s file handling capabilities to store and retrieve book details
without requiring a database.
c) To enable sorting and searching functionalities, allowing users to find books easily based
on title, author, or price.

3.0 Course outcomes addressed

COb Develop Python program to demonstrate the use of Operators.


COc Perform operations on Data Structures in Python.
COd Develop a functions for given problem.
COf Handle Exceptions.

4.0 Literature Review

• References
https://www.geeksforgeeks.org/python-programming-language-tutorial/
https://www.programiz.com/python-programming/online-compiler/
https://docs.python.org/3/tutorial/index.html
5.0 Actual Methodology Followed

➢ Introduction

A Library Management System (LMS) is a software application designed to manage the


operations of a library efficiently. It helps in organizing books, tracking issued and returned
books, maintaining records of users, and ensuring smooth library operations. Traditionally,
libraries relied on manual record-keeping, which was time-consuming and prone to errors.
However, with the advancement of technology, digital library management systems have become
essential for automating and streamlining these processes.
In this project, I develop a Library Management System using Python and file handling. The
system will allow users to add, search, delete, update, and sort book records efficiently. Unlike
traditional database-based systems, this project focuses on using file handling for storing and
retrieving book records.

❖ Purpose of the Library Management System Using Python

➢ Automate Library Operations


The system streamlines book management by allowing users to add, search, update,
delete, and sort books efficiently.

➢ Use of File Handling Instead of Databases


Instead of using MySQL or SQLite, the project utilizes Python’s file handling to store
book records in text files .txt format for data persistence.

➢ Search and Sorting Mechanisms


The system enables efficient search functionality by book title, author, or price, along
with sorting features to arrange books alphabetically or based on price.

➢ Scalability and Adaptability


The system is designed to be flexible, allowing the integration of additional
technologies to improve its performance and usability over time.
➢ Function Implementations in Library Management System

➢ Add a Book – Append New Book Details to the File


This function allows users to add new books to the library by appending their details to a
file. Each book entry typically includes attributes such as Book Name, Author, Price.

➢ View All Books – Read and Display Books from the File
This function retrieves all stored book records from the file and displays them in a user-
friendly format. The file is opened in read mode ("r"), and its contents are extracted and
displayed.

➢ Delete a Book – Remove a Specific Book Record


Users can remove a book from the library by searching for its details and deleting its entry
from the file. The file is first read into a temporary list, and the book entry to be deleted is
identified.

➢ Sort Books – Sort and Display Books Alphabetically or by Price


Sorting books makes it easier for users to browse the library. The system reads all book
records into a list and sorts them alphabetically by title or numerically by price.

➢ ALGORITHM

Step 1: Initialize the System


Define the file name BOOKS_FILE = "library.txt" to store book details.

Step 2: Define Functions


Function: add_book() (Adding a Book)
o Prompt the user to enter the book name, author, and price.
o Open the file in append mode ("a") and write the book details in CSV format.
o Display a success message.
Function: display_books() (Viewing All Books)
o Try to open the file in read mode ("r").
o Read all lines and check if books exist.
o If the file is empty, print a warning message.
o Otherwise, display all books in a readable format.
o Handle the FileNotFoundError if the file does not exist.

Function: delete_book() (Deleting a Book)


o Prompt the user to enter the book name to delete.
o Open the file in read mode and store all books in a list.
o Open the file in write mode and rewrite only the books that do not match the given
book name.
o If the book is found, display a success message; otherwise, notify the user.
o Handle the FileNotFoundError if the file does not exist.
Function: sort_books() (Sorting Books by Name or Price)
o Try to open the file and read all book records.
o If no books exist, print a warning message.
o Ask the user for sorting preference:
▪ Option 1: Sort books alphabetically by name.
▪ Option 2: Sort books numerically by price.
o Display the sorted list.
o Handle the FileNotFoundError if the file does not exist.

Step 3: Implement the Menu-Driven System

Display the main menu:


o Show available options:
1. Add a Book
2. View Books
3. Delete a Book
4. Sort Books
5. Exit
6.
Accept user input:
o If the user enters 1, call add_book().
o If the user enters 2, call display_books().
o If the user enters 3, call delete_book().
o If the user enters 4, call sort_books().
o If the user enters 5, print an exit message and break the loop.
o If the user enters an invalid choice, display an error message and prompt again.

Step 4: Repeat Until Exit


Continue displaying the menu until the user chooses to exit (choice = 5).
➢ Source Code

BOOKS_FILE = "library.txt"

def add_book():
book_name = input("Enter Book Name: ")
author = input("Enter Author Name: ")
price = input("Enter Book Price: ")

with open(BOOKS_FILE, "a") as file:


file.write(f"{book_name},{author},{price}\n")
print("Book added successfully!\n")

def display_books():
try:
with open(BOOKS_FILE, "r") as file:
books = file.readlines()

if not books:
print("No books found!\n")
return

print("\nLibrary Books:")
for book in books:
details = book.strip().split(",")
print(f"Book Name: {details[0]}, Author: {details[1]}, Price: {details[2]}")

except FileNotFoundError:
print("No books found! Add some books first.\n")

def delete_book():
book_name = input("Enter the Book Name to delete: ").strip()
try:
with open(BOOKS_FILE, "r") as file:
books = file.readlines()

found = False
with open(BOOKS_FILE, "w") as file:
for book in books:
details = book.strip().split(",")
if details[0].lower() != book_name.lower():
file.write(book)
else:
found = True

if found:
print(f"Book '{book_name}' deleted successfully!\n")
else:
print(f"Book '{book_name}' not found!\n")

except FileNotFoundError:
print("No books found! Add some books first.\n")

def sort_books():
try:
with open(BOOKS_FILE, "r") as file:
books = [line.strip().split(",") for line in file.readlines()]

if not books:
print("No books found!\n")
return

print("\nSort Books By:")


print("1. Name (A-Z)")
print("2. Price (Low to High)")
choice = input("Enter choice: ")

if choice == "1":
books.sort(key=lambda x: x[0].lower())
elif choice == "2":
books.sort(key=lambda x: float(x[2]))
else:
print("Invalid choice!\n")
return

print("\nSorted Books:")
for book in books:
print(f"Book Name: {book[0]}, Author: {book[1]}, Price: {book[2]}")

except FileNotFoundError:
print("No books found! Add some books first.\n")

while True:
print("\nLibrary Management System")
print("1. Add Book")
print("2. View Books")
print("3. Delete Book")
print("4. Sort Books")
print("5. Exit")

choice = input("Enter your choice: ")


if choice == "1":
add_book()
elif choice == "2":
display_books()
elif choice == "3":
delete_book()
elif choice == "4":
sort_books()
elif choice == "5":
print("Exiting... Goodbye!")
break
else:
print("Invalid choice! Try again.\n")
➢ Output of the Source Code

Add Book Details

View Book Details


Delete Book Details

Sort Book Details


➢ Components and Methodologies Used

• Python Programming – The program is developed using Python, a high-level


programming language known for its simplicity, readability, and extensive libraries,
making it ideal for file-based applications.
• File Handling – Instead of a database, the system utilizes text file storage (library.txt)
for storing and retrieving book records, using operations like reading, writing, appending,
and modifying file contents.
• String Manipulation – Various string functions such as .split(), .strip(), and .lower() are
used to process user inputs, format data, and enable case-insensitive searches.
• Conditional Statements – if-else statements manage different functionalities, ensuring
correct execution based on user choices and handling invalid inputs efficiently.
• Loops – while loops keep the program running until the user exits, while for loops iterate
through book records to display, search, or modify data.
• Exception Handling – The try-except mechanism is used to handle errors like
FileNotFoundError, preventing program crashes and ensuring smooth execution even
when files are missing.
• User Input Handling – input() functions take user inputs for book details and menu
selections, ensuring data is properly validated before performing operations like adding,
deleting, or sorting books.
6.0 Actual Resources Used :

Sr.no Name of Required Resources Specification Quantity

1. Hardware (PC/Laptop) Core i5, 8GB RAM 1

2. Operating System Windows 10 1

3. Software IDLE(Python 3.13) 1

4. Reference Book Python Book 1

7.0 Skill Developed:

• I understood how file handling works and how to use it effectively in a project.
• Through this project, I learned how to manage and manipulate data using file handling
instead of a database.
• Enhanced logical thinking and problem-solving skills by implementing sorting and
searching functionalities.
• Improve presentation skills.
Annexure–V
Teacher Evaluation Sheet

Name of Program: Computer Engineering Semester: Fifth (CO6I)

Course Title: Programming With Python


Subject Code : 22616
Title of the Micro Project:

“Library Management”
Group Members:
Roll Enrollment No. Seat No. Name Remark if any
No.
21 2200120021 Kumbhar Prarthana Ganpati

Course Outcomes (CO) Achieved:

COb Develop Python program to demonstrate the use of Operators.

COc Perform operations on Data Structures in Python.


COd Develop a functions for given problem.
COf Handle Exceptions.

Practical Outcomes (PrO) Achieved:


PrO03 Write simple Python program using Operators.
PrO04 Write simple Python program to demonstrate use of conditional statements.
PrO05 Write simple Python program to demonstrate use of looping statements.
PrO11 Develop user defined Python function for given problem.
PrO16 Write a program in Python to handle user defined exception for given problem.

Unit Outcomes (UO) Achieved:


UO2b Use different types of operators for writing the arithmetic expressions.
UO3a Write a Python program to use and manipulate lists for given problem.
UO4b Develop a relevant user defined functions for the given problem using Python code
UO6c Write the given data to a file.
UO6d Handle the given exceptions through Python program.
Evaluation as per suggested Rubric for Assessment of Micro Project

Sr. Characteristics to be Assessed Poor Average Good Excellent


No. Marks Marks(4- Marks(6- Marks(9-
(1-3) 5) 8) 10)
Ability to analyze problem and
1 identify requirements.

2 Information Collection

Ability to demonstrate design


3
solution .

4 Ability to apply required data type

5 Ability to run/debug

Ability to produce readable program


6 (Use of Comment /description)

Ability to demonstrate program in


individual
7
(Demonstrate understanding on
report design)
Delivery
8 (Time Taken)
Documentation
9 (Report Preparation)
Micro-Project Evaluation Sheet

Process Assessment Product Assessment

Roll No. Part-A Part-B Project Individual


Project Total
Project Report/ Presentation/Vi
Methodology Marks 10
Proposal Working Model va
(2 Marks) (4 Marks) Marks
(2 Marks) (2 Marks)

21

Comments/ Suggestions about Team Work/Leadership/ Inter-Personal Communication (if any)

……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………

Any Other Comment:

……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………

Name and Designation of Faculty : ……………………………………………………………….

Signature : ……………………………

You might also like