A Python-based command-line application for managing library operations. This system allows users to search for books, borrow items, return books with automatic fine calculation, and manage borrowing records.
- User Authentication: Secure login system with credentials verification
- Book Search: Search through a comprehensive database of books by title
- Borrow Books: Check out books with customizable borrowing duration
- Return Books: Process book returns with automatic late fee calculation
- Fine System: Automatic fine calculation at ₹10 per day for overdue books
- CSV-based Storage: Persistent data storage using CSV files
- Python 3.x
- pandas library
- Clone the repository:
git clone https://github.com/ArihantK15/Library-Management-System.git
cd Library-Management-System- Install required dependencies:
pip install pandas- Run the main application:
python main.py-
Login with your credentials (default username and password are stored in
cred.csv) -
Use the menu to:
- Search for a book: Enter the book title or partial title to find books
- Borrow a book: Enter the ISBN and borrower details with allowed borrowing days
- Return a book: Enter the ISBN and actual days kept to process the return
- Logout: Exit the system
1. Login to the system
2. Search for a book: "Python"
3. Note the ISBN from search results
4. Borrow the book by entering ISBN and borrowing period
5. Return the book and enter actual days kept
6. System automatically calculates any fines if overdue
Library-Management-System/
├── main.py # Main application file
├── cleaner.py # Data cleaning utility script
├── books_cleaned.csv # Processed book database
├── clean_books.csv # Sample cleaned books data
├── borrow.csv # Active borrowing records
├── cred.csv # User credentials
└── README.md # This file
Contains the library's book catalog with columns:
- ISBN
- Book-Title
- Book-Author
Tracks active borrowing records with columns:
- ISBN
- Name (Borrower)
- Days (Allowed borrowing period)
User login credentials with columns:
- Username
- Password
- Searches the
books_cleaned.csvfile for matching titles - Uses case-insensitive partial string matching
- Displays ISBN, Title, and Author of matching books
- User enters the ISBN of the book to borrow
- System verifies the book exists and isn't already borrowed
- Collects borrower name and allowed borrowing period
- Records the transaction in
borrow.csv
- User enters the ISBN of the book being returned
- System retrieves the allowed borrowing period from records
- User enters actual days the book was kept
- If days exceed allowed period:
- Calculates fine: (extra_days × ₹10)
- Displays the fine amount
- Removes the record from
borrow.csv
Late fees are calculated at ₹10 per day for any days exceeding the allowed borrowing period.
Example:
- Allowed days: 14
- Actual days: 18
- Extra days: 4
- Fine: 4 × ₹10 = ₹40
- Credentials are currently stored in plain text CSV (consider upgrading for production)
- ISBN values are stripped and standardized to prevent formatting issues
- Input validation prevents duplicate book borrowing
- Database integration (SQLite/PostgreSQL)
- User interface upgrade (GUI with tkinter or Flask web app)
- Admin panel for book management and user creation
- Email notifications for overdue books
- Advanced search filters (author, ISBN, publication year)
- Fine payment tracking
- Book reservation system
ArihantK15
This project is currently unlicensed. Feel free to use and modify as needed.
Feel free to fork this repository and submit pull requests for any improvements!
- Ensure
books_cleaned.csvis in the same directory asmain.py - Check that the CSV file has proper formatting with semicolon separators
- Verify credentials in
cred.csvare correct - Ensure no extra whitespace in credentials file
- Double-check the ISBN from the book search results
- Ensure ISBN is entered correctly without extra spaces
For issues or questions, please create an issue in the repository.
Happy Reading! 📖