Types¶
- websockets.typing.Data¶
Types supported in a WebSocket message:
strfor a Text frame,bytesfor a Binary.alias of
Union[str,bytes]
- websockets.typing.LoggerLike¶
Types accepted where a
Loggeris expected.alias of
Union[logging.Logger,logging.LoggerAdapter]
- websockets.typing.StatusLike¶
Types accepted where an
HTTPStatusis expected.alias of
Union[http.HTTPStatus,int]
- websockets.typing.Origin¶
Value of a
Originheader.alias of
str
- websockets.typing.Subprotocol¶
Subprotocol in a
Sec-WebSocket-Protocolheader.alias of
str
- websockets.typing.ExtensionName¶
Name of a WebSocket extension.
alias of
str
- websockets.typing.ExtensionParameter¶
Parameter of a WebSocket extension.
alias of
Tuple[str,Optional[str]]
- websockets.protocol.Event¶
Events that
events_received()may return.alias of
Union[websockets.http11.Request,websockets.http11.Response,websockets.frames.Frame]
- websockets.datastructures.HeadersLike¶
Types accepted where
Headersis expected.In addition to
Headersitself, this includes dict-like types where both keys and values arestr.alias of
Union[websockets.datastructures.Headers,Mapping[str,str],Iterable[Tuple[str,str]],websockets.datastructures.SupportsKeysAndGetItem]