main.py
310 Bytes
from typing import Optional
from fastapi import FastAPI
import datetime
app = FastAPI()
@app.get("/")
async def plainText():
return {"hi"}
@app.get("/time")
async def read_time():
now = datetime.datetime.now()
return {now}
@app.get("/query/")
async def read_query(id: int = 0):
return {id}