Skip to content

Strategosky/fastapi-library-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library Book Management System

A FastAPI backend application for managing library books, borrow records, and member queues.

Features

  • Book management (CRUD operations)
  • Borrow and return workflow
  • Member queue system for unavailable books
  • Search, sort, and pagination
  • Pydantic validation

Installation

pip install -r requirements.txt

Running the Server

uvicorn main:app --reload

API documentation available at: http://127.0.0.1:8000/docs

API Endpoints

Method Endpoint Description
GET / Welcome message
GET /books List all books
GET /books/{id} Get book by ID
GET /books/summary Books summary with genre breakdown
GET /books/filter Filter books by genre, author, availability
GET /books/search Search books by keyword
GET /books/sort Sort books by title, author, or genre
GET /books/page Paginate books
GET /books/browse Combined search + sort + pagination
POST /books Add a new book
PUT /books/{id} Update book details
DELETE /books/{id} Delete a book
GET /borrow-records List all borrow records
GET /borrow-records/search Search borrow records by member
GET /borrow-records/page Paginate borrow records
POST /borrow Borrow a book
POST /return/{book_id} Return a book
GET /queue View the waiting queue
POST /queue/add Add member to queue

Project Structure

fastapi-library-system/
├── main.py
├── requirements.txt
├── README.md
└── screenshots/

About

A FastAPI backend application for managing library books, borrow records, and member queues.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages