- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for legacy_request_state_context_var (0.13 sec)
-
tests/test_dependency_contextvars.py
from fastapi.testclient import TestClient legacy_request_state_context_var: ContextVar[Optional[Dict[str, Any]]] = ContextVar( "legacy_request_state_context_var", default=None ) app = FastAPI() async def set_up_request_state_dependency(): request_state = {"user": "deadpond"} contextvar_token = legacy_request_state_context_var.set(request_state) yield request_state
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Feb 17 12:40:12 UTC 2022 - 1.5K bytes - Viewed (0) -
docs/en/docs/release-notes.md
from typing import Any, Dict, Optional legacy_request_state_context_var: ContextVar[Optional[Dict[str, Any]]] = ContextVar( "legacy_request_state_context_var", default=None ) async def set_up_request_state_dependency(): request_state = {"user": "deadpond"} contextvar_token = legacy_request_state_context_var.set(request_state) yield request_state
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Nov 01 11:25:57 UTC 2024 - 460.3K bytes - Viewed (0)