c13d1c7
1
2
3
4
5
6
7
8
9
10
11
from fastapi import FastAPI from pydantic import BaseModel app=FastAPI() class Input(BaseModel): name: str @app.post("/hello") def say_hello(data: Input): return {"message": f"Hello {data.name}!"}