Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library Management System

A comprehensive Python-based Library Management System that allows librarians to manage books, users, and borrowing operations through a command-line interface.

Features

  • 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

Project Structure

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

Requirements

  • Python 3.6 or higher
  • No external dependencies required (uses only the Python standard library)

Installation

  1. Clone or download the repository: git clone https://github.com/Andrew-Zed/Library-Management-System

  2. Navigate to the project directory: cd library-management-system

  3. Run the application: python main.py or python3 main.py

Usage

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.

Sample Workflow

  1. Add books to the library
  2. Register library users
  3. Allow users to borrow books
  4. Process book returns
  5. Generate reports to analyze library activities

Data Persistence

All data (books, users, transactions) is stored in JSON files in the data/ directory, allowing the system to maintain state between program executions.

Sample Data

The system initializes with sample books and users if no data is found, allowing you to explore its functionality immediately.

Implementation Details

  • 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

About

A simple Library Management System built in Python, running via terminal. It allows users to manage books, patrons, and borrowing records. Features include adding, searching, and updating books, along with checking out and returning books. Terminal-based, using Python and file-based data storage.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages