Files
raspool/api.py
2026-05-20 15:33:38 -04:00

17 lines
369 B
Python

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)