Skip to content

Commit

Permalink
Update AsyncHTTPProvider docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kclowes committed Aug 27, 2021
1 parent 4456bce commit 21a7863
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/providers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,13 @@ AsyncHTTPProvider

.. code-block:: python
>>> from web3 import Web3
>>> w3 = Web3(Web3.AsyncHTTPProvider("http://127.0.0.1:8545"))
>>> from web3 import Web3, AsyncHTTPProvider
>>> from web3.eth import AsyncEth
>>> from web3.net import AsyncNet
>>> w3 = Web3(AsyncHTTPProvider("http://127.0.0.1:8545"),
... modules={'eth', (AsyncEth,), 'net': (AsyncNet,)},
... middlewares=[]) # See supported middleware section below for middleware options
Under the hood, the ``AsyncHTTPProvider`` uses the python
`aiohttp <https://docs.aiohttp.org/en/stable/>`_ library for making requests.
Expand Down
1 change: 1 addition & 0 deletions newsfragments/2123.docs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update AsyncHTTPProvider doc example to include modules and middlewares keyword arguments

0 comments on commit 21a7863

Please sign in to comment.