Skip to content

neo-0706/python-project-semester-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Library Management System (Python)

A comprehensive, file-based Library Management System developed in Python. This project implements a multi-role environment (Admin, Librarian, and Member) with persistent data storage using JSON files.

πŸš€ Key Features

πŸ” Security & Access Control

  • Triple-Attempt Login: Users have a maximum of 3 attempts to log in before the system terminates for security.
  • Role-Based Access: Distinct menus and permissions for Admins, Librarians, and Members.
  • Account Status: Support for Active and Inactive user accounts.

πŸ‘₯ User Management (Admin)

  • Create, Edit, and Delete users (Admins, Librarians, Members).
  • Toggle user activity status (Admins are prevented from deactivating themselves).
  • Complete oversight of the system's user base.

πŸ“š Inventory & Loan Management (Librarian)

  • Book Management: Add, Update, or Remove books from the catalog.
  • Request Handling: Review and Approve/Reject loan, extension, and return requests.
  • Inventory Tracking: Automated update of book availability counts upon approval of loans and returns.

πŸ“– Member Services (Member)

  • Advanced Search: Search for books by Title, Author, or Category using a flexible keyword system.
  • Loan System: Request to borrow books, extend return dates, or notify the librarian of returns.
  • Personal Dashboard: View a list of currently borrowed books and their status (Pending/Approved).

πŸ› οΈ Technology Stack

  • Language: Python 3.x
  • Data Persistence: JSON (Users, Books, and Loan records)
  • Libraries: json, datetime

πŸ“ File Structure

  • main.py: The entry point of the application.
  • users.json: Stores user credentials, roles, and status.
  • books.json: Stores book details, categories, and inventory counts.
  • loan.json: Stores all transaction records between members and the library.

Data Format Example (books.json)

{
    "id": 1,
    "title": "The Great Gatsby",
    "author": "F. Scott Fitzgerald",
    "category": "Fiction",
    "available_count": 5
}
Advanced Search Logic
The system uses filter and lambda to search across multiple fields simultaneously:

Python

search_result = list(filter(lambda book: 
    query in book["title"].lower() or 
    query in book["author"].lower() or 
    query in book["category"].lower(), books))
πŸ”§ How to Run
Clone the repository:

Bash

git clone [https://github.com/neo-0706/python-project-semester-1.git](https://github.com/neo-0706/python-project-semester-1.git)
Ensure you have Python installed.

Run the application:

Bash

python main.py
πŸ“ Author
Developed by Mohammad Hosein Shahsavand baghdadi as a first-semester Python project.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages