- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for include_router (0.14 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/en/docs/reference/fastapi.md
options: members: - openapi_version - webhooks - state - dependency_overrides - openapi - websocket - include_router - get - put - post - delete - options - head - patch - trace - on_event
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 701 bytes - Viewed (0) -
tests/test_generate_unique_id_function.py
responses={404: {"model": List[Message]}}, ) def post_subrouter(item1: Item, item2: Item): return item1, item2 # pragma: nocover router.include_router(sub_router) app.include_router(router, generate_unique_id_function=custom_generate_unique_id3) client = TestClient(app) response = client.get("/openapi.json") data = response.json() assert data == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jan 13 15:10:26 UTC 2024 - 66.7K 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/reference/apirouter.md
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 - options - head - patch - trace
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 524 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) -
tests/test_annotated.py
app = FastAPI() router = APIRouter(prefix="/nested") @router.get("/test") async def test(var: Annotated[str, Query()] = "bar"): return {"foo": var} app.include_router(router) client = TestClient(app) response = client.get("/nested/test") assert response.status_code == 200 assert response.json() == {"foo": "bar"} def test_openapi_schema():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.2K bytes - Viewed (0)