pythonasyncioapiasyncfastapiframeworkjsonjson-schemaopenapiopenapi3pydanticpython-typespython3redocreststarletteswaggerswagger-uiuvicornweb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
228 B
9 lines
228 B
from fastapi import FastAPI
|
|
from fastapi.responses import HTMLResponse
|
|
|
|
app = FastAPI(default_response_class=HTMLResponse)
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items():
|
|
return "<h1>Items</h1><p>This is a list of items.</p>"
|
|
|