Skip to content

Commit

Permalink
Update documentation for WebsocketProviderV2
Browse files Browse the repository at this point in the history
  • Loading branch information
fselmo committed Jan 25, 2024
1 parent 1615a97 commit 10fda00
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/providers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -226,16 +226,17 @@ WebsocketProviderV2 (beta)
and supported and is expected to be stable in the next major version of *web3.py*
(v7).

.. py:class:: web3.providers.websocket.WebsocketProviderV2(endpoint_uri, websocket_kwargs, call_timeout)
.. py:class:: web3.providers.websocket.WebsocketProviderV2(endpoint_uri, websocket_kwargs, silence_listener_task_exceptions)
This provider handles interactions with an WS or WSS based JSON-RPC server.

* ``endpoint_uri`` should be the full URI to the RPC endpoint such as
``'ws://localhost:8546'``.
* ``websocket_kwargs`` this should be a dictionary of keyword arguments which
will be passed onto the ws/wss websocket connection.
* ``request_timeout`` is the timeout in seconds, as a float. Used when receiving or
sending data over the connection. This value defaults to 20 seconds.
* ``silence_listener_task_exceptions`` is a boolean that determines whether
exceptions raised by the listener task are silenced. Defaults to ``False``,
raising any exceptions that occur in the listener task.

Under the hood, the ``WebsocketProviderV2`` uses the python websockets library for
making requests. If you would like to modify how requests are made, you can
Expand Down

0 comments on commit 10fda00

Please sign in to comment.