- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for include_router (0.12 sec)
-
tests/test_router_events.py
state.sub_router_startup = True @sub_router.on_event("shutdown") def sub_router_shutdown() -> None: state.sub_router_shutdown = True router.include_router(sub_router) app.include_router(router) assert state.app_startup is False assert state.router_startup is False assert state.sub_router_startup is False assert state.app_shutdown is False
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 24 19:09:52 UTC 2024 - 7.3K bytes - Viewed (0) -
docs/em/docs/tutorial/bigger-applications.md
## 🔌 🎏 📻 💗 🕰 ⏮️ 🎏 `prefix` 👆 💪 ⚙️ `.include_router()` 💗 🕰 ⏮️ *🎏* 📻 ⚙️ 🎏 🔡. 👉 💪 ⚠, 🖼, 🎦 🎏 🛠️ 🔽 🎏 🔡, ✅ `/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
``` /// 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 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
/// 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 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
/// 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 | "Detalhe Técnico"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 19.6K bytes - Viewed (0) -
docs/en/docs/advanced/testing-dependencies.md
The original dependency could be used in a *path operation function*, a *path operation decorator* (when you don't use the return value), a `.include_router()` call, etc. FastAPI will still be able to override it. /// Then you can reset your overrides (remove them) by setting `app.dependency_overrides` to be an empty `dict`: ```Python
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.9K bytes - Viewed (0) -
docs/em/docs/advanced/testing-dependencies.md
```Python hl_lines="28-29 32" {!../../docs_src/dependency_testing/tutorial001.py!} ``` /// tip 👆 💪 ⚒ 🔗 🔐 🔗 ⚙️ 🙆 👆 **FastAPI** 🈸. ⏮️ 🔗 💪 ⚙️ *➡ 🛠️ 🔢*, *➡ 🛠️ 👨🎨* (🕐❔ 👆 🚫 ⚙️ 📨 💲), `.include_router()` 🤙, ♒️. FastAPI 🔜 💪 🔐 ⚫️. /// ⤴️ 👆 💪 ⏲ 👆 🔐 (❎ 👫) ⚒ `app.dependency_overrides` 🛁 `dict`: ```Python app.dependency_overrides = {} ``` /// tip
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.7K bytes - Viewed (0) -
fastapi/routing.py
users_router = APIRouter() @users_router.get("/users/") def read_users(): return [{"name": "Rick"}, {"name": "Morty"}] internal_router.include_router(users_router) app.include_router(internal_router) ``` """ if prefix: assert prefix.startswith("/"), "A path prefix must start with '/'" assert not prefix.endswith(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 12 09:44:57 UTC 2024 - 172.1K 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 18.4K bytes - Viewed (0) -
docs/de/docs/advanced/testing-dependencies.md
Die ursprüngliche Abhängigkeit könnte in einer *Pfadoperation-Funktion*, einem *Pfadoperation-Dekorator* (wenn Sie den Rückgabewert nicht verwenden), einem `.include_router()`-Aufruf, usw. verwendet werden. FastAPI kann sie in jedem Fall überschreiben. ///
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.5K bytes - Viewed (0)