Загрузить файлы в «venv/Lib/site-packages/uvicorn/middleware»

This commit is contained in:
2026-07-02 20:53:07 +00:00
parent fa96a7a8a7
commit ea5a5d1480
5 changed files with 481 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
from uvicorn._types import (
ASGI2Application,
ASGIReceiveCallable,
ASGISendCallable,
Scope,
)
class ASGI2Middleware:
def __init__(self, app: "ASGI2Application"):
self.app = app
async def __call__(self, scope: "Scope", receive: "ASGIReceiveCallable", send: "ASGISendCallable") -> None:
instance = self.app(scope)
await instance(receive, send)