Types#
- websockets.typing.Data#
Types supported in a WebSocket message:
str
for a Text frame,bytes
for a Binary.
- websockets.typing.LoggerLike#
Types accepted where a
Logger
is expected.alias of
Union
[logging.Logger
,logging.LoggerAdapter
]
- websockets.typing.ExtensionParameter#
Parameter of a WebSocket extension.
- websockets.connection.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
Headers
is expected.In addition to
Headers
itself, 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
]
- websockets.datastructures.SupportsKeysAndGetItem = <class 'websockets.datastructures.SupportsKeysAndGetItem'>#
Dict-like types with
keys() -> str
and__getitem__(key: str) -> str
methods.