Giter VIP home page Giter VIP logo

library's Introduction

Library Management System

Overview

This project is a simple library management system built using FastAPI, designed to manage books and users with different roles (admin and regular user). It provides endpoints for authentication, adding, deleting, and fetching books from the library.

Features

  • User Authentication: Authenticate users with admin and regular roles using JWT tokens.
  • Manage Books: Admin users can add and delete books from the library.
  • Fetch Books: Users can view the list of available books in the library.

Installation

Clone the repository: git clone https://github.com/your_username/library-management.git

API Endpoints

  • POST /api/auth/login: Authenticate users and obtain JWT token.
  • POST /api/add/addBook: Add a new book to the library (admin only).
  • DELETE /api/delete/deleteBook: Delete a book from the library (admin only).
  • GET /api/fetch/home: Fetch the list of books from the library.

Usage

  1. Authenticate as admin or regular user using the login endpoint.
  2. Use the obtained JWT token to access the protected endpoints.
  3. Admin users can add and delete books using the respective endpoints.
  4. Regular users can view the list of available books using the fetch books endpoint.

Technologies Used.

  • Python: Programming language
  • FastAPI: Web framework for building APIs with Python.
  • JWT: Token-based authentication for securing endpoints.
  • Pandas: Library for data manipulation and CSV file handling.

Testing Commands

  • To run unit tests, command -> python -m pytest tests/unit_tests
  • To run integration tests, command -> python -m pytest tests/integration_tests

library's People

Contributors

nupur-khare avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.