MCPcopy
hub / github.com/encode/starlette / _WrapASGI2

Class _WrapASGI2

starlette/testclient.py:69–79  ·  view source on GitHub ↗

Provide an ASGI3 interface onto an ASGI2 app.

Source from the content-addressed store, hash-verified

67
68
69class _WrapASGI2:
70 """
71 Provide an ASGI3 interface onto an ASGI2 app.
72 """
73
74 def __init__(self, app: ASGI2App) -> None:
75 self.app = app
76
77 async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
78 instance = self.app(scope)
79 await instance(receive, send)
80
81
82class _AsyncBackend(TypedDict):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by 1

__init__Method · 0.68