- datetime
FastAPI - Dynamic response
- A small step ahead generating part of the content of the response dynamically.
examples/fastapi/dynamic-response/main.py
from fastapi import FastAPI import datetime app = FastAPI() @app.get("/") async def root(): return {"message": f"Hello World at {datetime.datetime.now()}"}