This is a basic Python CLI-based Library Management System built with SQLite for persistent storage.
- User Registration and Login (with unique User ID)
- View all available and borrowed books
- Borrow books with automatic charge calculation (βΉ10/day)
- Return books with fine calculation (βΉ5/day late)
- Persistent storage using SQLite database
- Clean and simple CLI interface
- Python 3
- SQLite3 (built-in Python module)
-
Clone the repository
git clone https://github.com/VivekYadav-77/secure-library-system.git cd librarymanagement -
Run the script
python librarymanage.py
-
Options available:
- Register as a new user (get a unique User ID)
- Login using your User ID
- View available books
- Borrow and return books
- Logout or Exit
- Each user is assigned a unique User ID on registration.
- Borrow and return records are tied to this ID, ensuring proper tracking of books and fines.
- id (PK)
- name
- id (PK)
- title
- author
- available (1 = available, 0 = borrowed)
- id (PK)
- user_id (FK β users.id)
- book_id (FK β books.id)
- borrow_date
- expected_return
- return_date
- charges
- fine
--- Library Management ---
1. Register User
2. Login with User ID
3. Exit
Choose option: 1
Enter your name: Rahul
Registered successfully! Your User ID is 1
--- User Menu (Rahul) ---
1. View Books
2. Borrow Book
3. Return Book
4. Logout