HomeToolsAbout

FastAPI Template

Basic Template

from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class ReqData(BaseModel): userInput: str @app.post("/fastapi/request") async def read_root(req_data: ReqData): print("User Input: ", req_data.userInput) return req_data
AboutContact