mirror of
https://github.com/fastapi/fastapi.git
synced 2025-12-27 08:10:57 -05:00
Co-authored-by: Artem Ivanov <artem@worklife.io> Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
9 lines
216 B
Python
9 lines
216 B
Python
from fastapi import FastAPI
|
|
|
|
app = FastAPI(swagger_ui_parameters={"syntaxHighlight.theme": "obsidian"})
|
|
|
|
|
|
@app.get("/users/{username}")
|
|
async def read_user(username: str):
|
|
return {"message": f"Hello {username}"}
|