- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 360 for router (0.04 sec)
-
tests/test_security_oauth2_authorization_code_bearer_scopes_openapi.py
) async def read_with_get_token(): return {"message": "Admin Access"} router = APIRouter(dependencies=[Security(oauth2_scheme, scopes=["read"])]) @router.get("/items/") async def read_items(token: Optional[str] = Depends(oauth2_scheme)): return {"token": token} @router.post("/items/") async def create_item( token: Optional[str] = Security(oauth2_scheme, scopes=["read", "write"]),
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 6.6K bytes - Viewed (0) -
docs/en/docs/how-to/custom-request-and-route.md
## Custom `APIRoute` class in a router { #custom-apiroute-class-in-a-router } You can also set the `route_class` parameter of an `APIRouter`: {* ../../docs_src/custom_request_and_route/tutorial003_py310.py hl[26] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 08:55:32 UTC 2025 - 4.6K bytes - Viewed (0) -
docs/es/docs/advanced/openapi-callbacks.md
/// ### Agrega el router de callback { #add-the-callback-router } En este punto tienes las *path operation(s)* del callback necesarias (las que el *desarrollador externo* debería implementar en la *API externa*) en el router de callback que creaste arriba.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 8.3K bytes - Viewed (0) -
tests/test_modules_same_name_body/app/main.py
from fastapi import FastAPI from . import a, b app = FastAPI() app.include_router(a.router, prefix="/a")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 28 17:35:16 UTC 2019 - 150 bytes - Viewed (0) -
tests/test_modules_same_name_body/app/a.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 160 bytes - Viewed (0) -
tests/test_custom_middleware_exception.py
return wrapper = self.receive_wrapper(receive) await self.app(scope, wrapper, send) @router.post("/middleware") def run_middleware(file: UploadFile = File(..., description="Big File")): return {"message": "OK"} app.include_router(router) app.add_middleware(ContentSizeLimitMiddleware, max_content_size=2**8) client = TestClient(app)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Thu Aug 25 21:44:40 UTC 2022 - 2.8K bytes - Viewed (0) -
docs_src/bigger_applications/app_py39/internal/admin.py
from fastapi import APIRouter router = APIRouter() @router.post("/") async def update_admin():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 147 bytes - Viewed (0) -
docs/zh/docs/tutorial/bigger-applications.md
/// ### 避免名称冲突 我们将直接导入 `items` 子模块,而不是仅导入其 `router` 变量。 这是因为我们在 `users` 子模块中也有另一个名为 `router` 的变量。 如果我们一个接一个地导入,例如: ```Python from .routers.items import router from .routers.users import router ``` 来自 `users` 的 `router` 将覆盖来自 `items` 中的 `router`,我们将无法同时使用它们。 因此,为了能够在同一个文件中使用它们,我们直接导入子模块: ```Python hl_lines="5" title="app/main.py"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun May 11 13:37:26 UTC 2025 - 18.4K bytes - Viewed (0) -
docs/de/docs/how-to/custom-request-and-route.md
## Benutzerdefinierte `APIRoute`-Klasse in einem Router { #custom-apiroute-class-in-a-router } Sie können auch den Parameter `route_class` eines `APIRouter` festlegen: {* ../../docs_src/custom_request_and_route/tutorial003_py310.py hl[26] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 13:54:34 UTC 2025 - 5.7K bytes - Viewed (0) -
docs/pt/docs/how-to/custom-request-and-route.md
## Classe `APIRoute` personalizada em um router { #custom-apiroute-class-in-a-router } Você também pode definir o parâmetro `route_class` de uma `APIRouter`: {* ../../docs_src/custom_request_and_route/tutorial003_py310.py hl[26] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 20:32:40 UTC 2025 - 5.1K bytes - Viewed (0)