8000 GitHub - himacharan128/library-api: an API based Library Management System, specifically the backend layer of the application.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

himacharan128/library-api

Repository files navigation

Library Management System

Overview

The Library Management System is a backend application built using FastAPI and MongoDB. It provides APIs for managing student records in a library.

Table of Contents

Features

  • Create, read, update, and delete student records
  • Filter students by country and minimum age
  • Connects to MongoDB Atlas for data storage

Technologies Used

  • Python
  • FastAPI
  • MongoDB
  • PyMongo

File Structure

library_management_system/
├── app/
│   ├── database.py
│   ├── models.py
│   ├── controllers.py
│   ├── routes.py
├── main.py
├── requirements.txt
├── venv
└── .env

Installation

  1. Clone the repository:

    git clone https://github.com/himacharan128/library-api.git
  2. Install dependencies:

    cd library-api
    pip install -r requirements.txt
  3. Set up environment variables:

     MONGODB_URI=your_mongodb_uri
  4. Start the server:

    uvicorn main:app --reload

Usage

Visit http://127.0.0.1.8000 in your web browser to access the Library Management System.

API Documentation

Create Student

  • POST /students
  • Request Body:
    {
     "name": "Sham",
     "age": 25,
     "address": {
       "city": "Noida",
       "country": "IND"
     }
    }

List Students

  • GET /students
  • Query Parameters:
  • country (optional): Filter students by country
  • age (optional): Filter students by minimum age

Fetch Student

  • GET /students/{id}

Update Student

  • PATCH /students/{id}
  • Request Body:
    {
      "name": "string",
      "age": 0,
      "address": {
        "city": "string",
        "country": "string"
      }
    }
    

Delete Student

  • DELETE /students/{id}

Contributing

Contributions are welcome! Feel free to submit issues and pull requests.

License

This project is licensed under the MIT License.

About

an API based Library Management System, specifically the backend layer of the application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0