- Sort Score
- Result 10 results
- Languages All
Results 31 - 34 of 34 for KSession (0.17 sec)
-
fastapi/exceptions.py
websocket: WebSocket, session: Annotated[str | None, Cookie()] = None, item_id: str, ): if session is None: raise WebSocketException(code=status.WS_1008_POLICY_VIOLATION) await websocket.accept() while True: data = await websocket.receive_text() await websocket.send_text(f"Session cookie is: {session}")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 4.9K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_params/test_tutorial001_an.py
("/items", {"ads_id": "ads_track"}, 200, {"ads_id": "ads_track"}), ( "/items", {"ads_id": "ads_track", "session": "cookiesession"}, 200, {"ads_id": "ads_track"}, ), ("/items", {"session": "cookiesession"}, 200, {"ads_id": None}), ], ) def test(path, cookies, expected_status, expected_response): client = TestClient(app, cookies=cookies)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware.py
@pytest.fixture(scope="module") def client(): test_db = Path("./sql_app.db") if test_db.is_file(): # pragma: nocover test_db.unlink() # Import while creating the client to create the DB after starting the test session from docs_src.sql_databases.sql_app import alt_main # Ensure import side effects are re-executed importlib.reload(alt_main) with TestClient(alt_main.app) as c: yield c
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.3K bytes - Viewed (0) -
fastapi/routing.py
from starlette.responses import JSONResponse, Response from starlette.routing import ( BaseRoute, Match, compile_path, get_name, request_response, websocket_session, ) from starlette.routing import Mount as Mount # noqa from starlette.types import ASGIApp, Lifespan, Scope from starlette.websockets import WebSocket from typing_extensions import Annotated, Doc, deprecated
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 170.1K bytes - Viewed (0)