Commit 04176d2d authored by madhu.tr's avatar madhu.tr

task 2

parent 63e0d6cf
from fastapi import APIRouter
from scripts.core.handler.task1 import Task1
report_router= APIRouter()
@report_router.get("/getdata1")
def most_violation():
return Task1().read_violation()
from servicee import monthlyhumiditydata
from fastapi import FastAPI
@report_router.get("/getdata2")
def no_violation():
return Task1().read_noviolation()
app = FastAPI()
@report_router.get('/getdata')
def get_data():
return Task1().Fnd()
@app.get("/getData1")
def monthlyhumiditydata1():
fpath,fname =monthlyhumiditydata()
@report_router.get('/getDetails')
def checkdata(business_name ,record_type):
return Task1().check_result(business_name ,record_type)
\ No newline at end of file
return FileResponse(fpath,media_type='application/octet-stream',filename=fname)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment