from fastapi import FastAPI from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/typer") async def read_typer(): return RedirectResponse("https://typer.tiangolo.com")