- Sort Score
- Num 10 results
- Language All
Results 51 - 60 of 193 for router2 (0.05 seconds)
-
tests/test_router_prefix_with_template.py
from fastapi import APIRouter, FastAPI from fastapi.testclient import TestClient app = FastAPI() router = APIRouter() @router.get("/users/{id}") def read_user(segment: str, id: str): return {"segment": segment, "id": id} app.include_router(router, prefix="/{segment}") client = TestClient(app) def test_get(): response = client.get("/seg/users/foo")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Apr 08 04:37:38 GMT 2020 - 484 bytes - Click Count (0) -
tests/test_router_events.py
sub_router = APIRouter(lifespan=subrouter_lifespan) router = APIRouter(lifespan=router_lifespan) router.include_router(sub_router) app = FastAPI(lifespan=lifespan) app.include_router(router) @app.get("/") def main(request: Request) -> dict[str, str]: assert request.state.app assert request.state.router assert request.state.sub_routerCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 7.3K 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) -
docs_src/bigger_applications/app_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: Wed Dec 17 20:41:43 GMT 2025 - 147 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) -
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)Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Thu Aug 25 21:44:40 GMT 2022 - 2.8K 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/en/docs/advanced/openapi-callbacks.md
/// ### Add the callback router { #add-the-callback-router } At this point you have the *callback path operation(s)* needed (the one(s) that the *external developer* should implement in the *external API*) in the callback router you created above. Now use the parameter `callbacks` in *your API's path operation decorator* to pass the attribute `.routes` (that's actually just a `list` of routes/*path operations*) from that callback router:Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 8K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/EventListener.kt
* * Each call is made on either a reused [Connection] from a pool, or on a new connection * established from a planned [Route]. OkHttp won't retry if it's already attempted all * available routes. * * @param retry true if OkHttp will make another attempt */ open fun retryDecision( call: Call, exception: IOException, retry: Boolean, ) {
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Oct 07 21:03:04 GMT 2025 - 24.9K bytes - Click Count (0)