Hugging Face
Models
Datasets
Spaces
Buckets
new
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
pgsoft
/
fastapi
like
0
Sleeping
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
8000682
fastapi
/
app.py
steveagi
sync vs async
8000682
over 2 years ago
raw
Copy download link
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"
}