diff --git a/docs/providers.rst b/docs/providers.rst index b1c628a749..127ced1d45 100644 --- a/docs/providers.rst +++ b/docs/providers.rst @@ -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 `_ library for making requests. diff --git a/newsfragments/2123.docs.rst b/newsfragments/2123.docs.rst new file mode 100644 index 0000000000..6dabe7ebbd --- /dev/null +++ b/newsfragments/2123.docs.rst @@ -0,0 +1 @@ +Update AsyncHTTPProvider doc example to include modules and middlewares keyword arguments