talira

websocket-client

WebSocket client for Python with low-level API access

open sourceApache-2.0free

websocket-client is a WebSocket client for Python that gives access to the protocol's low-level APIs as well as a WebSocketApp with callbacks and automatic reconnection. It implements the hybi-13 version of the WebSocket protocol, can connect through proxies with python-socks, and gets a small speed-up from wsaccel. It's tested on Python 3.10+.

Problems it solves

  • connect to a WebSocket API from a Python script
  • stream messages from a WebSocket server in Python
  • reconnect a Python WebSocket client automatically

Features

  • low-level WebSocket API
  • WebSocketApp with callbacks and automatic reconnection
  • proxy support through python-socks
  • optional wsaccel speed-up

Limitations

  • Doesn't support the permessage-deflate compression extension (RFC 7692).1

Alternatives

The same job

These do what websocket-client does.

  1. websockets Library for building WebSocket servers and clients in Python

Compare websocket-client with the top 3