steveagi commited on
Commit
8000682
·
1 Parent(s): 9b437d0

sync vs async

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -6,6 +6,10 @@ app = FastAPI()
6
  async def root():
7
  return {"message": "PGAI API"}
8
 
9
- @app.get("/info")
10
- async def info():
 
 
 
 
11
  return {"message": "haha"}
 
6
  async def root():
7
  return {"message": "PGAI API"}
8
 
9
+ @app.get("/info_sync")
10
+ def info_sync():
11
+ return {"message": "haha"}
12
+
13
+ @app.get("/info_async")
14
+ async def info_async():
15
  return {"message": "haha"}