A desktop library management application built with Python, Tkinter, and SQLite.
This project provides a simple GUI to manage:
- books
- members
- borrowing and returning
- transaction reports
The application stores data locally in Library.db and runs as a standard Python desktop app.
- Add, update, delete, and search books
- Add, update, and delete members
- Borrow books using member ID or exact member name
- Borrow books using book ID or exact book title
- Automatically decrease available stock when a book is borrowed
- Return books from the transactions table
- Automatically restore available stock when a book is returned
- Automatically calculate overdue fines
- Filter transactions by status
- Generate report data in table and text format
- Python 3
- Tkinter / ttk
- SQLite3
LibraryManagementSystem/
├── LIBRARY.py
├── Library.db
├── README.md
└── library_app/
├── __init__.py
├── database.py
├── helpers.py
└── ui.py
-
LIBRARY.pyMain entry point. Run this file to start the app. -
library_app/ui.pyTkinter user interface, tabs, widgets, button callbacks, and table refresh logic. -
library_app/database.pySQLite setup and database operations for books, members, transactions, and reports. -
library_app/helpers.pyShared helper functions such as validation, selected-row handling, and report text formatting.
- Make sure Python 3 is installed.
- Open the project folder in terminal.
- Run:
python3 LIBRARY.pyDo not run library_app/ui.py directly unless you intentionally add a separate standalone runner for it.
- Search books by title
- Show all books
- Add a new book
- Update selected book details
- Delete a selected book
- Add a member
- Update selected member details
- Delete a selected member
- Borrow a book
- Return a selected borrowed book
- View all transactions
- Filter transactions by
All,Borrowed, orReturned
- Filter by date range
- Filter by member name
- Filter by book title
- View report records in a table
- View the same report in text format
The application creates these tables automatically if they do not already exist:
booksmemberstransactions
book_idtitleauthoryearpriceavailable
member_idnameemailaddressphone
TransIDmember_idbook_idborrow_datedue_datereturn_datestatusfine
- Book year must be between
1500and2099 - Price must be greater than
0 - Available copies cannot be negative
- A borrowed book cannot be deleted while still issued
- A member with an active borrowed book cannot be deleted
- A book cannot be borrowed if no copies are available
- The same member cannot borrow the same book again until it is returned
- Fine is calculated when the book is returned
- Data is stored in the local SQLite file
Library.db - If
Library.dbalready exists, the app reuses it - The app auto-creates missing tables on startup
- The UI uses standard
ttkwidgets for a simple desktop look
- Member name and book title matching in the borrow section is exact, not partial
- If multiple members have the same exact name, the app asks you to use member ID
- If multiple books have the same exact title, the app asks you to use book ID
- There is no login system
- There is no export to PDF or Excel yet
- Add search for members
- Add search by author
- Add export for reports
- Add issue history by member
- Add dashboard statistics
- Add form reset buttons
Shradha Singh