blob: 643ff21f60d58e502fbd7e6be6bf4f0cf9a95183 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
from asyncio import Queue
from typing import TypedDict, Optional
class Config(TypedDict):
subdomain: str
class RequestData(TypedDict):
method: str
path: str
headers: list[tuple[str, str]]
body: Optional[str]
class ResponseData(TypedDict):
status: int
headers: list[tuple[str, str]]
body: Optional[str]
class MemoryConnection(TypedDict):
requests: Queue[RequestData]
responses: Queue[ResponseData]
|