MCPcopy Create free account
hub / github.com/encode/starlette / __call__

Method __call__

benchmarks/websocket_benchmark.py:36–40  ·  view source on GitHub ↗
(self, scope: Scope, receive: Receive, send: Send)

Source from the content-addressed store, hash-verified

34
35class JSONEchoApp:
36 async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
37 websocket = WebSocket(scope, receive, send)
38 await websocket.accept()
39 await websocket.send_json(await websocket.receive_json())
40 await websocket.close()
41
42
43@dataclass(frozen=True)

Callers

nothing calls this directly

Calls 5

acceptMethod · 0.95
send_jsonMethod · 0.95
receive_jsonMethod · 0.95
closeMethod · 0.95
WebSocketClass · 0.90

Tested by

no test coverage detected