MCPcopy Create free account
hub / github.com/dbunt1tled/python-fast-api / get_state

Function get_state

src/core/http/request/state.py:19–24  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

17
18
19def get_state(request: Request) -> State:
20 if not hasattr(request.state, "user"):
21 request.state.user = None
22 if not hasattr(request.state, "is_authenticated"):
23 request.state.is_authenticated = False
24 return cast(State, request.state)
25
26
27def get_auth_state(request: Request) -> AuthState:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected