mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
Initial commit
This commit is contained in:
17
venv/Lib/site-packages/uvicorn/middleware/asgi2.py
Normal file
17
venv/Lib/site-packages/uvicorn/middleware/asgi2.py
Normal file
@@ -0,0 +1,17 @@
|
||||
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)
|
Reference in New Issue
Block a user