- Flask
- MSSQL
-
cd hostel_management_system
-
pip install -r requirements.txt
(only for the first time) -
Do
python make_table.py
(only for the first time) -
DO
python app.py
-
Add or Edit the routes and functions in the file run_model.py
- Locally, eg: http://localhost:3434/status
- 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"
}