- Sort Score
- Num 10 results
- Language All
Results 31 - 40 of 315 for router (0.55 seconds)
-
docs_src/bigger_applications/app_an_py310/internal/admin.py
from fastapi import APIRouter router = APIRouter() @router.post("/") async def update_admin():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 147 bytes - Click Count (0) -
docs_src/bigger_applications/app_an_py310/routers/items.py
from ..dependencies import get_token_header router = APIRouter( prefix="/items", tags=["items"], dependencies=[Depends(get_token_header)], responses={404: {"description": "Not found"}}, ) fake_items_db = {"plumbus": {"name": "Plumbus"}, "gun": {"name": "Portal Gun"}} @router.get("/") async def read_items(): return fake_items_db @router.get("/{item_id}") async def read_item(item_id: str):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 1011 bytes - Click Count (0) -
tests/test_annotated.py
assert response.json() == {"foo": "baz"} def test_nested_router(): 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
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 10.5K bytes - Click Count (0) -
docs/zh-hant/docs/how-to/custom-request-and-route.md
{* ../../docs_src/custom_request_and_route/tutorial002_an_py310.py hl[17:19] *} ## 在路由器中自訂 `APIRoute` 類別 { #custom-apiroute-class-in-a-router } 你也可以在 `APIRouter` 上設定 `route_class` 參數: {* ../../docs_src/custom_request_and_route/tutorial003_py310.py hl[26] *} 在此範例中,`router` 底下的路徑操作會使用自訂的 `TimedRoute` 類別,並在回應中多加上一個 `X-Response-Time` 標頭,標示產生該回應所花費的時間:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 4.2K bytes - Click Count (0) -
docs/en/docs/editor-support.md
## Features { #features } - **Path Operation Explorer** - A sidebar tree view of all <dfn title="routes, endpoints">*path operations*</dfn> in your application. Click to jump to any route or router definition. - **Route Search** - Search by path, method, or name with <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>E</kbd> (on macOS: <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>E</kbd>).Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 2.5K bytes - Click Count (0) -
internal/dsync/dsync-server_test.go
lsrv := &lockServer{ mutex: sync.Mutex{}, lockMap: make(map[string]int64), } lockServer := lockServerHandler{ lsrv: lsrv, } lockServers[i] = lsrv router := mux.NewRouter().SkipClean(true) subrouter := router.PathPrefix("/").Subrouter() subrouter.Methods(http.MethodPost).Path("/v1/health").HandlerFunc(lockServer.HealthHandler)Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 8.3K bytes - Click Count (0) -
tests/test_sse.py
yield ServerSentEvent(raw_data="cpu,87.3,1709145600", event="csv") router = APIRouter() @router.get("/events", response_class=EventSourceResponse) async def stream_events(): yield {"msg": "hello"} yield {"msg": "world"} app.include_router(router, prefix="/api") @pytest.fixture(name="client") def client_fixture(): with TestClient(app) as c:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 09:21:52 GMT 2026 - 9.8K bytes - Click Count (0) -
cmd/admin-handlers_test.go
) // adminErasureTestBed - encapsulates subsystems that need to be setup for // admin-handler unit tests. type adminErasureTestBed struct { erasureDirs []string objLayer ObjectLayer router *mux.Router done context.CancelFunc } // prepareAdminErasureTestBed - helper function that setups a single-node // Erasure backend for admin-handler tests.Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 13.9K bytes - Click Count (1) -
docs/ja/docs/how-to/custom-request-and-route.md
{* ../../docs_src/custom_request_and_route/tutorial002_an_py310.py hl[17:19] *} ## ルーターでのカスタム `APIRoute` クラス { #custom-apiroute-class-in-a-router } `APIRouter` の `route_class` パラメータを設定することもできます: {* ../../docs_src/custom_request_and_route/tutorial003_py310.py hl[26] *} この例では、`router` 配下の *path operations* はカスタムの `TimedRoute` クラスを使用し、レスポンスの生成にかかった時間を示す追加の `X-Response-Time` ヘッダーがレスポンスに含まれます:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 5.4K bytes - Click Count (0) -
docs/de/llm-prompt.md
* the env var: die Umgebungsvariable * the `PATH` environment variable: die `PATH`-Umgebungsvariable * the `PATH`: der `PATH` * the `requirements.txt`: die `requirements.txt` * the API Router: der API-Router * the Authorization-Header: der Autorisierungsheader * the `Authorization`-Header: der `Authorization`-Header * the background task: der Hintergrundtask * the button: der Button
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Dec 29 18:54:20 GMT 2025 - 9.8K bytes - Click Count (0)