Version 2.2.0
A robust, role-based library management system for tracking books, members, and loans. Built with Python and MySQL, featuring enhanced security, reporting, and usability improvements over previous versions.
-
Role-Based Access Control
- Admin: Full system control (users, books, reports)
- Librarian: Daily operations (checkouts, returns, overdue tracking)
- Member: Self-service portal (view loans, search books)
-
Enhanced Security
- SHA-256 password hashing
- Input validation for emails, ISBNs, and user roles
- Session-based authentication
-
Comprehensive Reporting
- Circulation summaries (active loans, overdue books)
- Inventory analytics (books by genre, recent additions)
- Member activity tracking (most active users, overdue lists)
-
Improved Database Management
- Automatic database/table initialization
- Foreign key constraints for data integrity
- Indexes for faster queries
-
User Experience
- Clean CLI interface with tabulated data
- Intuitive menu navigation
- Contextual error messages
| Feature | v2.1.0 | v2.2.0 Improvements |
|---|---|---|
| Architecture | Procedural code | Class-based structure for better modularity and maintainability |
| Security | Plaintext passwords | SHA-256 hashing + improved input validation |
| Book Management | Basic metadata | Genre, location, and publication year tracking |
| Loan System | Simple checkouts | Overdue tracking with statuses (checked_out, returned, overdue) |
| Error Handling | Limited | Transaction rollbacks + detailed error logging |
| User Interface | Basic menus | Tabulated displays + consistent headers + streamlined workflows |
| Reports | None | 6+ report types (circulation, inventory, member activity) |
- Python 3.10+
- MySQL Server 8.0+
pippackage manager
-
Clone the Repository
git clone https://github.com/your-repo/library-management.git cd library-management -
Install Dependencies
pip install mysql-connector-python tabulate
-
Database Setup
- MySQL will auto-create the
library_managementdatabase on first run - Default admin credentials:
Username: admin Password: admin123
- MySQL will auto-create the
-
Run the System
python main.py
- Manage users (add, suspend, update roles)
- Add/remove books, update quantities
- Generate reports (circulation, inventory)
- Check out/return books
- View active loans and overdue items
- Search books by title/author/genre
- View personal loan history
- Search available books
- Update passwords
- Fault Tolerance: Automatic transaction rollbacks on errors prevent data corruption.
- Persistent Connections: Stable MySQL connection pooling ensures minimal downtime.
- Uninterrupted Service: Designed for 24/7 operation with no need for frequent restarts.
MIT License | Full License Text
For issues or feature requests, contact:
- Your Name
- Email: [email protected]