This is a console-based Library Management System built using Python’s Object-Oriented Programming (OOP) concepts.
It helps manage books and borrowers, handle borrowing/returning of books, and check availability — all through a simple terminal interface.
This project is beginner-friendly and focuses on class design, modular coding, and data handling.
To design a mini library system that demonstrates:
- Python OOP concepts
- Clean and modular project structure
- In-memory data management
- Console-based user input/output
| Component | Description |
|---|---|
| Language | Python 3.8 or higher |
| Libraries | Only standard libraries (datetime, sys) |
| IDE | Visual Studio Code / PyCharm / Any text editor |
| Version Control | Git & GitHub |
| Execution | Run from terminal or command prompt |
| Hardware | 4GB RAM or more |
library-management-python/ ├── src/ │ ├── book.py # Book class definition │ ├── borrower.py # Borrower class definition │ ├── library.py # Library management logic ├── main.py # Entry point with menu loop ├── README.md # Project overview and usage guide └── .gitignore # Ignore cache and temporary files
✅ Add, update, and view books
✅ Add borrowers and manage memberships
✅ Borrow and return books
✅ Track due dates using datetime
✅ Check availability of books
✅ Simple console menu system
- Plan Classes — Identify
Book,Borrower, andLibrary. - Create
BookClass — Handles book info (title, author, ISBN, quantity). - Create
BorrowerClass — Stores user info and borrowed book list. - Create
LibraryClass — Manages all books and borrowers. - Add Borrowing Logic — Uses
datetimefor due dates. - Build
main.pyMenu — Console-based interaction system. - Test and Handle Errors — Validate user inputs and logic.
- Push to GitHub — Use Git for version control and sharing.
class Book:
def __init__(self, title, author, isbn, genre, quantity):
self.title = title
self.author = author
self.isbn = isbn
self.genre = genre
self.quantity = quantity
def update_quantity(self, new_quantity):
if new_quantity >= 0:
self.quantity = new_quantity
else:
print("Quantity cannot be negative.")
from src.book import Book
from src.borrower import Borrower
from src.library import Library
library = Library()
while True:
print("\n==== Library Management System ====")
print("1. Add Book")
print("2. Add Borrower")
print("3. Borrow Book")
print("4. Exit")
choice = input("Enter your choice: ")
if choice == '1':
title = input("Book Title: ")
author = input("Author: ")
isbn = input("ISBN: ")
genre = input("Genre: ")
quantity = int(input("Quantity: "))
library.add_book(Book(title, author, isbn, genre, quantity))
print("✅ Book added successfully!")
elif choice == '2':
name = input("Borrower Name: ")
contact = input("Contact: ")
mid = input("Membership ID: ")
library.add_borrower(Borrower(name, contact, mid))
print("✅ Borrower added successfully!")
elif choice == '3':
mid = input("Membership ID: ")
isbn = input("Book ISBN: ")
library.borrow_book(mid, isbn)
elif choice == '4':
print("👋 Exiting... Thank you!")
break
else:
print("❌ Invalid choice! Try again.")
Run the main program
python main.py
Example Output
==== Library Management System ====
1. Add Book
2. Add Borrower
3. Borrow Book
4. Exit
Enter your choice: 1
Book Title: Python Basics
Author: John Doe
ISBN: 12345
Genre: Programming
Quantity: 5
✅ Book added successfully!
Author
Aravind M
🎓 B.Com | 💻 Full Stack Developer (Nxtwave)
📍 Dharmapuri, India
📬 Open to collaboration and learning