- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for include_router (2.28 sec)
-
tests/test_infer_param_optionality.py
if user_id is None: return {"item_id": item_id} else: return {"item_id": item_id, "user_id": user_id} app.include_router(user_router, prefix="/users") app.include_router(item_router, prefix="/items") app.include_router(item_router, prefix="/users/{user_id}/items") client = TestClient(app) def test_get_users(): """Check that /users returns expected data"""Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 12.1K bytes - Viewed (0) -
docs/es/docs/tutorial/bigger-applications.md
/// info | Información `users.router` contiene el `APIRouter` dentro del archivo `app/routers/users.py`. Y `items.router` contiene el `APIRouter` dentro del archivo `app/routers/items.py`. /// Con `app.include_router()` podemos agregar cada `APIRouter` a la aplicación principal de `FastAPI`. Incluirá todas las rutas de ese router como parte de ella. /// note | Detalles Técnicos
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 19.6K bytes - Viewed (0) -
docs/pt/docs/tutorial/bigger-applications.md
/// info | Informação `users.router` contém o `APIRouter` dentro do arquivo `app/routers/users.py`. E `items.router` contém o `APIRouter` dentro do arquivo `app/routers/items.py`. /// Com `app.include_router()` podemos adicionar cada `APIRouter` ao aplicativo principal `FastAPI`. Ele incluirá todas as rotas daquele roteador como parte dele. /// note | Detalhes Técnicos
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 20:32:40 UTC 2025 - 19.7K bytes - Viewed (0) -
docs/en/docs/tutorial/bigger-applications.md
/// info `users.router` contains the `APIRouter` inside of the file `app/routers/users.py`. And `items.router` contains the `APIRouter` inside of the file `app/routers/items.py`. /// With `app.include_router()` we can add each `APIRouter` to the main `FastAPI` application. It will include all the routes from that router as part of it. /// note | Technical Details
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 08:55:32 UTC 2025 - 18.6K bytes - Viewed (0) -
docs/de/docs/tutorial/bigger-applications.md
/// info | Info `users.router` enthält den `APIRouter` in der Datei `app/routers/users.py`. Und `items.router` enthält den `APIRouter` in der Datei `app/routers/items.py`. /// Mit `app.include_router()` können wir jeden `APIRouter` zur Hauptanwendung `FastAPI` hinzufügen. Es wird alle Routen von diesem Router als Teil von dieser inkludieren. /// note | Technische Details
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 13:54:34 UTC 2025 - 21.3K bytes - Viewed (0) -
docs/ru/docs/tutorial/bigger-applications.md
/// info | Примечание `users.router` содержит `APIRouter` из файла `app/routers/users.py`. А `items.router` содержит `APIRouter` из файла `app/routers/items.py`. /// С помощью `app.include_router()` мы можем добавить каждый из маршрутизаторов (`APIRouter`) в основное приложение `FastAPI`. Он подключит все маршруты заданного маршрутизатора к нашему приложению. /// note | Технические детали
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Thu Dec 11 21:25:03 UTC 2025 - 30.4K bytes - Viewed (0) -
docs/zh/docs/tutorial/bigger-applications.md
## 多次使用不同的 `prefix` 包含同一个路由器 你也可以在*同一*路由器上使用不同的前缀来多次使用 `.include_router()`。 在有些场景这可能有用,例如以不同的前缀公开同一个的 API,比方说 `/api/v1` 和 `/api/latest`。 这是一个你可能并不真正需要的高级用法,但万一你有需要了就能够用上。 ## 在另一个 `APIRouter` 中包含一个 `APIRouter` 与在 `FastAPI` 应用程序中包含 `APIRouter` 的方式相同,你也可以在另一个 `APIRouter` 中包含 `APIRouter`,通过: ```Python router.include_router(other_router) ```
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun May 11 13:37:26 UTC 2025 - 18.4K bytes - Viewed (0) -
tests/test_sub_callbacks.py
(e.g. "payment successful"). """ # Send the invoice, collect the money, send the notification (the callback) return {"msg": "Invoice received"} app.include_router(subrouter, callbacks=events_callback_router.routes) client = TestClient(app) def test_get(): response = client.post( "/invoices/", json={"id": "fooinvoice", "customer": "John", "total": 5.3}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 12.9K bytes - Viewed (0) -
tests/test_dependency_overrides.py
@router.get("/router-decorator-depends/", dependencies=[Depends(common_parameters)]) async def router_decorator_depends(): return {"in": "router-decorator-depends"} app.include_router(router) client = TestClient(app) async def overrider_dependency_simple(q: Optional[str] = None): return {"q": q, "skip": 5, "limit": 10} async def overrider_sub_dependency(k: str):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 11.2K bytes - Viewed (0)