- Sort Score
- Num 10 results
- Language All
Results 61 - 70 of 308 for Wouters (0.05 seconds)
-
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_router_circular_import.py
import pytest from fastapi import APIRouter def test_router_circular_import(): router = APIRouter() with pytest.raises( AssertionError, match="Cannot include the same APIRouter instance into itself. Did you mean to include a different router?", ):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 10 10:58:40 GMT 2026 - 317 bytes - Click Count (0) -
docs_src/bigger_applications/app_an_py310/routers/users.py
from fastapi import APIRouter router = APIRouter() @router.get("/users/", tags=["users"]) async def read_users(): return [{"username": "Rick"}, {"username": "Morty"}] @router.get("/users/me", tags=["users"]) async def read_user_me(): return {"username": "fakecurrentuser"} @router.get("/users/{username}", tags=["users"]) async def read_user(username: str):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 407 bytes - Click Count (0) -
tests/test_router_redirect_slashes.py
from fastapi import APIRouter, FastAPI from fastapi.testclient import TestClient def test_redirect_slashes_enabled(): app = FastAPI() router = APIRouter() @router.get("/hello/") def hello_page() -> str: return "Hello, World!" app.include_router(router) client = TestClient(app) response = client.get("/hello/", follow_redirects=False) assert response.status_code == 200
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Jun 22 10:37:50 GMT 2023 - 974 bytes - Click Count (0) -
tests/test_include_route.py
from fastapi.responses import JSONResponse from fastapi.testclient import TestClient app = FastAPI() router = APIRouter() @router.route("/items/") def read_items(request: Request): return JSONResponse({"hello": "world"}) app.include_router(router) client = TestClient(app) def test_sub_router(): response = client.get("/items/")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Apr 08 04:37:38 GMT 2020 - 496 bytes - Click Count (0) -
tests/test_empty_router.py
import pytest from fastapi import APIRouter, FastAPI from fastapi.exceptions import FastAPIError from fastapi.testclient import TestClient app = FastAPI() router = APIRouter() @router.get("") def get_empty(): return ["OK"] app.include_router(router, prefix="/prefix") client = TestClient(app) def test_use_empty(): with client: response = client.get("/prefix")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Jun 11 22:37:34 GMT 2023 - 805 bytes - Click Count (1) -
docs_src/custom_request_and_route/tutorial003_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 1K bytes - Click Count (0) -
api/maven-api-core/src/main/java/org/apache/maven/api/services/ProblemCollector.java
* * @return true if the problem collector has overflowed and some problems were not preserved */ boolean problemsOverflow(); /** * Reports a problem: always maintains the counters, but whether problem is preserved in memory, depends on * implementation and its configuration. * * @param problem the problem to report * @return {@code true} if passed problem is preserved by this call.Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Fri Jul 18 17:30:19 GMT 2025 - 11.4K bytes - Click Count (0) -
tests/test_additional_responses_router.py
message: str app = FastAPI() router = APIRouter() @router.get("/a", responses={501: {"description": "Error 1"}}) async def a(): return "a" @router.get( "/b", responses={ 502: {"description": "Error 2"}, "4XX": {"description": "Error with range, upper"}, }, ) async def b(): return "b" @router.get( "/c", responses={
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 5.6K bytes - Click Count (0) -
tests/test_additional_response_extra.py
from fastapi.testclient import TestClient from inline_snapshot import snapshot 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 Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 1.3K bytes - Click Count (0)