You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import datetime as dt
|
|
|
|
from fastapi import FastAPI
|
|
|
|
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
|
|
|
|
|
|
@app.get('/ping')
|
|
|
|
def pong():
|
|
|
|
now = dt.datetime.now(dt.timezone.utc)
|
|
|
|
return {'ping': "pong!", 'now': now}
|