A comprehensive Python-based Library Management System that allows librarians to manage books, users, and borrowing operations through a command-line interface.
-
Book Management
- Add new books to the library
- Update book information (author, price)
- Search for books by title or author
- Remove books from the library
- View all books in the collection
-
User Management
- Register new users
- Update user information
- Search for users by name or ID
- Remove users from the system
- View all registered users
-
Borrowing Operations
- Borrow books with automatic availability checking
- Return books with late return tracking
- Record all transactions for future reference
-
Reporting
- Generate inventory reports
- View currently borrowed books
- Track overdue books
- Generate user-specific reports
- View transaction history
library_management_system/ ├── src/ # Source code directory │ ├── models/ # Data models │ │ ├── book.py # Book class definition │ │ ├── user.py # User class definition │ │ └── transaction.py # Transaction class definition │ │ │ ├── services/ # Business logic │ │ ├── book_service.py # Book management functionality │ │ ├── user_service.py # User management functionality │ │ ├── borrowing_service.py # Borrow/return functionality │ │ └── report_service.py # Reporting functionality │ │ │ ├── utils/ # Utility functions │ │ ├── date_utils.py # Date manipulation helpers │ │ └── validation.py # Input validation functions │ │ │ └── ui/ # User interface │ └── cli.py # Command-line interface │ ├── data/ # Data storage directory │ ├── books.json # Book data storage │ ├── users.json # User data storage │ └── transactions.json # Transaction records │ ├── main.py # Main entry point └── README.md # Project documentation
- Python 3.6 or higher
- No external dependencies required (uses only the Python standard library)
-
Clone or download the repository: git clone https://github.com/Andrew-Zed/Library-Management-System
-
Navigate to the project directory: cd library-management-system
-
Run the application: python main.py or python3 main.py
The application provides a text-based menu interface. Upon starting, you'll see the main menu with options for managing books, users, borrowing, returning, and generating reports.
- Add books to the library
- Register library users
- Allow users to borrow books
- Process book returns
- Generate reports to analyze library activities
All data (books, users, transactions) is stored in JSON files in the data/ directory, allowing the system to maintain state between program executions.
The system initializes with sample books and users if no data is found, allowing you to explore its functionality immediately.
- The system uses object-oriented design principles with clear separation of concerns
- Models represent the core data structures (Book, User, Transaction)
- Services encapsulate the business logic for each aspect of the system
- The UI layer handles user interaction without direct knowledge of the underlying data operations
- Utility modules provide helper functions for common tasks