- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 87 for APIRouter (0.13 sec)
-
docs/en/docs/reference/apirouter.md
# `APIRouter` class Here's the reference information for the `APIRouter` class, with all its parameters, attributes and methods. You can import the `APIRouter` class directly from `fastapi`: ```python from fastapi import APIRouter ``` ::: fastapi.APIRouter options: members: - websocket - include_router - get - put - post - delete
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 524 bytes - Viewed (0) -
docs/em/docs/tutorial/bigger-applications.md
👉 💪 ⚠, 🖼, 🎦 🎏 🛠️ 🔽 🎏 🔡, ✅ `/api/v1` & `/api/latest`. 👉 🏧 ⚙️ 👈 👆 5️⃣📆 🚫 🤙 💪, ✋️ ⚫️ 📤 💼 👆. ## 🔌 `APIRouter` ➕1️⃣ 🎏 🌌 👆 💪 🔌 `APIRouter` `FastAPI` 🈸, 👆 💪 🔌 `APIRouter` ➕1️⃣ `APIRouter` ⚙️: ```Python router.include_router(other_router) ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 15.5K bytes - Viewed (0) -
docs/de/docs/tutorial/bigger-applications.md
## Einen `APIRouter` in einen anderen einfügen Auf die gleiche Weise, wie Sie einen `APIRouter` in eine `FastAPI`-Anwendung einbinden können, können Sie einen `APIRouter` in einen anderen `APIRouter` einbinden, indem Sie Folgendes verwenden: ```Python router.include_router(other_router) ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 21K bytes - Viewed (0) -
docs/en/docs/tutorial/bigger-applications.md
This is an advanced usage that you might not really need, but it's there in case you do. ## Include an `APIRouter` in another The same way you can include an `APIRouter` in a `FastAPI` application, you can include an `APIRouter` in another `APIRouter` using: ```Python router.include_router(other_router) ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 18.4K bytes - Viewed (0) -
cmd/bucket-handlers_test.go
if err != nil { t.Fatalf("Test %s: Failed to create HTTP request for RemoveBucketHandler: <ERROR> %v", instanceType, err) } // Since `apiRouter` satisfies `http.Handler` it has a ServeHTTP to execute the logic of the handler. // Call the ServeHTTP to execute the handler. apiRouter.ServeHTTP(rec, req) switch rec.Code { case http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent:
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jun 10 15:50:49 UTC 2024 - 39.8K bytes - Viewed (0) -
tests/test_router_events.py
def app_shutdown() -> None: state.app_shutdown = True router = APIRouter() @router.on_event("startup") def router_startup() -> None: state.router_startup = True @router.on_event("shutdown") def router_shutdown() -> None: state.router_shutdown = True sub_router = APIRouter() @sub_router.on_event("startup") def sub_router_startup() -> None:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 24 19:09:52 UTC 2024 - 7.3K bytes - Viewed (0) -
tests/test_default_response_class_router.py
from fastapi.responses import HTMLResponse, JSONResponse, PlainTextResponse from fastapi.testclient import TestClient class OverrideResponse(JSONResponse): media_type = "application/x-override" app = FastAPI() router_a = APIRouter() router_a_a = APIRouter() router_a_b_override = APIRouter() # Overrides default class router_b_override = APIRouter() # Overrides default class router_b_a = APIRouter()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Mar 01 20:49:20 UTC 2020 - 5K bytes - Viewed (0) -
docs/zh/docs/tutorial/bigger-applications.md
你也可以在*同一*路由器上使用不同的前缀来多次使用 `.include_router()`。 在有些场景这可能有用,例如以不同的前缀公开同一个的 API,比方说 `/api/v1` 和 `/api/latest`。 这是一个你可能并不真正需要的高级用法,但万一你有需要了就能够用上。 ## 在另一个 `APIRouter` 中包含一个 `APIRouter` 与在 `FastAPI` 应用程序中包含 `APIRouter` 的方式相同,你也可以在另一个 `APIRouter` 中包含 `APIRouter`,通过: ```Python router.include_router(other_router) ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 18.4K bytes - Viewed (0) -
docs/pt/docs/tutorial/bigger-applications.md
Esse é um uso avançado que você pode não precisar, mas está lá caso precise. ## Incluir um `APIRouter` em outro Da mesma forma que você pode incluir um `APIRouter` em um aplicativo `FastAPI`, você pode incluir um `APIRouter` em outro `APIRouter` usando: ```Python router.include_router(other_router) ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 19.6K bytes - Viewed (0) -
tests/test_additional_response_extra.py
from fastapi import APIRouter, FastAPI from fastapi.testclient import TestClient router = APIRouter() sub_router = APIRouter() app = FastAPI() @sub_router.get("/") def read_item(): return {"id": "foo"} router.include_router(sub_router, prefix="/items") app.include_router(router) client = TestClient(app) def test_path_operation(): response = client.get("/items/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.2K bytes - Viewed (0)