This commit is contained in:
2026-05-20 15:33:38 -04:00
commit dbd015f3b8
8 changed files with 121 additions and 0 deletions

16
api.py Normal file
View File

@@ -0,0 +1,16 @@
from fastapi import FastAPI
from main import read_temp_water
#from main import read_ph
import uvicorn
app = FastAPI()
@app.get("/get_water_temp")
async def read_root():
return {"Message": read_temp_water()}
#@app.get("/get_ph")
#async def read_root():
# return {"Message": read_ph()}
if(__name__ == "__main__"):
uvicorn.run(app, host='0.0.0.0', port=8000)