adiXcodr / hostel-management-system

Backend App for Hostel Management System using MSSQL and Flask

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backend App for Hostel Management System


Technologies used

  • Flask
  • MSSQL

Steps to run the application

  1. cd hostel_management_system

  2. pip install -r requirements.txt (only for the first time)

  3. Do python make_table.py (only for the first time)

  4. DO python app.py

  5. Add or Edit the routes and functions in the file run_model.py

Testing the API

  1. Locally, eg: http://localhost:3434/status
  2. Test the API with POSTMAN.

Example for GET boarderS :

  • Set the URL TO http://localhost:3435/api/get_all_boarders to get all the boarders (DO GET).
  • Set the URL TO http://localhost:3435/api/get_boarder/ to get a boarder for an email (DO POST).

Example input for ADD BOARDERS (POST):

  • Set the URL TO http://localhost:3435/api/add_boarders

INPUT:

    {
    "name":"Subhasish Goswami",
    "image":"https://asdasdasd/asdasd.png",
    "email":"asdasdasd@gmail.com",
    "phone":"100123123",
    "gtoken":"123981239127317237"
    }

Example input for UPDATE boarderS :

  • Set the URL TO http://localhost:3435/run_model/update_boarders to Update Single Record

INPUT:

    {   
        "api_key":"Enter API key for successfull operation",
        "email":"asdasdasd@gmail.com",
        "name": "Upam Sarmah"
    }

Example input for DELETE boarderS :

  • Set the URL TO http://localhost:3435/run_model/delete_boarders to Delete boarder Record

INPUT:

    {

        "api_key":"Enter API key for successfull operation",
        "email":"asdasdasd@gmail.com"
    
    }

Authors

About

Backend App for Hostel Management System using MSSQL and Flask

License:Other


Languages

Language:Python 100.0%