fastapi / app.py
steveagi's picture
sync vs async
8000682
raw
history blame
265 Bytes
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def root():
return {"message": "PGAI API"}
@app.get("/info_sync")
def info_sync():
return {"message": "haha"}
@app.get("/info_async")
async def info_async():
return {"message": "haha"}