- Sort Score
- Num 10 results
- Language All
Results 21 - 30 of 378 for Router (0.04 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs_src/custom_request_and_route/tutorial003_py310.py
response.headers["X-Response-Time"] = str(duration) print(f"route duration: {duration}") print(f"route response: {response}") print(f"route response headers: {response.headers}") return response return custom_route_handler app = FastAPI() router = APIRouter(route_class=TimedRoute) @app.get("/") async def not_timed():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 1K bytes - Click Count (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/")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 1.2K bytes - Click Count (0) -
fastapi/routing.py
if responses is None: responses = {} for route in router.routes: if isinstance(route, APIRoute): combined_responses = {**responses, **route.responses} use_response_class = get_value_or_default( route.response_class, router.default_response_class, default_response_class,Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 174.6K bytes - Click Count (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")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jun 28 17:35:16 GMT 2019 - 150 bytes - Click Count (0) -
tests/test_modules_same_name_body/app/a.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 160 bytes - Click Count (0) -
docs/ru/docs/tutorial/bigger-applications.md
Вместо того чтобы импортировать только переменную `router`, мы импортируем непосредственно суб-модуль `items`. Мы делаем это потому, что у нас есть ещё одна переменная `router` в суб-модуле `users`. Если бы мы импортировали их одну за другой, как показано в примере: ```Python from .routers.items import router from .routers.users import router ```
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Thu Dec 11 21:25:03 GMT 2025 - 30.4K bytes - Click Count (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] *}Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 4.6K bytes - Click Count (0) -
docs_src/bigger_applications/app_an_py39/internal/admin.py
from fastapi import APIRouter router = APIRouter() @router.post("/") async def update_admin():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 147 bytes - Click Count (0) -
tests/test_modules_same_name_body/app/b.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 161 bytes - Click Count (0) -
docs/pt/llm-prompt.md
* path operation: operação de rota * path operation function: função de operação de rota * prefix: prefixo * request (as in HTTP request): request (do not change if it's already translated to requisição) * router (as in FastAPI's router): router (do not change if it's already translated to "roteador" or "roteadores") * response (as in HTTP response): response (do not change if it's already translated to resposta) * shutdown (of the app): encerramento
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 3.1K bytes - Click Count (0)