mirror of
https://github.com/fastapi/fastapi.git
synced 2026-01-22 21:08:23 -05:00
16 lines
267 B
Python
16 lines
267 B
Python
from fastapi import FastAPI
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.api_route("/api_route")
|
|
def non_operation():
|
|
return {"message": "Hello World"}
|
|
|
|
|
|
def non_decorated_route():
|
|
return {"message": "Hello World"}
|
|
|
|
|
|
app.add_api_route("/non_decorated_route", non_decorated_route)
|