Pyhtagodzilla a13a74a87d init
2025-09-28 23:50:13 +08:00

17 lines
376 B
Python

from fastapi import FastAPI
from pydantic import BaseModel
from pygments.lexer import default
class Item(BaseModel):
name: str
description: str = None
price: float
tax: float = None
app = FastAPI()
@app.get("/sensors/{sensor_id}")
async def read_sensor(sensor_id: str):
sensor_message = {}
return {"sensor_id": sensor_id, "message": sensor_message}