Skip to content

OrBibi/OOP_Library_mannage

Repository files navigation

Library Management System

A library management system built with Python.

This project allows librarians to manage books, members, and borrowing processes while implementing design patterns for maintainability and scalability.

Features

  • User Registration & Authentication: Register and log in securely.
  • Book Management: Add, remove, search, and categorize books by title, author, genre, or year.
  • Borrowing System: Borrow and return books, with a waiting list for unavailable books.
  • Member Notifications: Notify members about updates, using the Observer design pattern.
  • Data Persistence: Save and load data through CSV files for books and members.
  • Statistics & Popularity: Display the top 10 most popular books.

Design Patterns Implemented

  1. Factory:
    • The BookFactory class ensures valid and consistent creation of Book objects.
  2. Strategy:
    • The filtering mechanism uses strategy patterns (TitleFilter, AuthorFilter, etc.) for flexible book search.
  3. Iterator:
    • MemberIterator enables iteration over members in a structured way.
  4. Observer:
    • Members are notified of updates through the update method, adhering to the Observer pattern.
  5. Decorator:
    • Logging functionalities are handled with a decorator to log success and failure of critical operations.
  6. Singleton:
    • Library is implements Singleton pattern.

How to Run

Open the "libraryGUI.py" file and run it.

First you need to register and then you can enter to the system.

important: do not register with the name 'q' , it is save to the tests!!!!

After you entered in to the main menu, open in front of you many actions that you can do.

we add a video in the folder called "video_guide" with audio of the main things in the program.

File Structure

  • LibraryGUI.py: Entry point for the application.
  • Library.py: Core library management logic.
  • Book.py: Book-related classes and factory.
  • Member.py: Member-related classes and iterator.
  • FilterStrategy.py: Strategy pattern for filtering books.
  • log_decorator.py: Logging functionalities using the decorator pattern.
  • Tests: Unit tests for various components.
  • books.csv: represents all the books in the library.
  • members.csv: represents all the members that ever enter to a waiting list.
  • users.csv: represents all the librarian(users).
  • log.txt: represents all the actions that recorded in the program.

About

Library mannage system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages