from fastapi import FastAPI import sys import os sys.path.insert(0,'.') import bhouse_lib app = FastAPI() @app.get("/items/{item_id}") async def read_item(item_id): return {"item_id": item_id} @app.get("/bhouse/{month_num}") async def montyly_rep(month_num): rep=bhouse_lib.get_monthly_report(month_num) lst=[] for r in rep: lst.append(r[0]) return {"results": lst} @app.get("/") async def root(): return {"message": "Hello World"}