hypercorn.typing module

class hypercorn.typing.ASGI2Protocol(*args, **kwds)

Bases: typing.Protocol

class hypercorn.typing.Context(*args, **kwds)

Bases: typing.Protocol

event_class: Type[hypercorn.typing.Event]
async static sleep(wait: Union[float, int]) → None
spawn(func: Callable, *args: Any) → None
async spawn_app(app: Union[Type[hypercorn.typing.ASGI2Protocol], Callable[[dict, Callable, Callable], Awaitable[None]]], config: hypercorn.config.Config, scope: dict, send: Callable[[dict], Awaitable[None]]) → Callable[[dict], Awaitable[None]]
static time() → float
class hypercorn.typing.Event(*args, **kwds)

Bases: typing.Protocol

async clear() → None
async set() → None
async wait() → None
class hypercorn.typing.H2AsyncStream(*args, **kwds)

Bases: typing.Protocol

async close() → None
async data_received(data: bytes) → None
async ended() → None
async handle_request(event: h2.events.RequestReceived, scheme: str, client: Tuple[str, int], server: Tuple[str, int]) → None
async reset() → None
scope: dict
class hypercorn.typing.H2SyncStream(*args, **kwds)

Bases: typing.Protocol

close() → None
data_received(data: bytes) → None
ended() → None
async handle_request(event: h2.events.RequestReceived, scheme: str, client: Tuple[str, int], server: Tuple[str, int]) → None
reset() → None
scope: dict