File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,8 @@ Batch Requests
120
120
121
121
.. note ::
122
122
123
- Only read-only operations are supported by ``batch_requests ``.
123
+ Only read-only operations that exist within modules on the ``Web3 `` class
124
+ (e.g. ``w3.eth ``, ``w3.net ``) are supported by ``batch_requests ``.
124
125
Unsupported methods include:
125
126
126
127
- :meth: `subscribe <web3.eth.Eth.subscribe> `
@@ -130,13 +131,19 @@ Batch Requests
130
131
- :meth: `sign_transaction <web3.eth.Eth.sign_transaction> `
131
132
- :meth: `sign <web3.eth.Eth.sign> `
132
133
- :meth: `sign_typed_data <web3.eth.Eth.sign_typed_data> `
134
+ - ``w3.provider.make_request() ``.
133
135
134
136
Async Batch Requests
135
137
`````````````````` ``
136
138
137
139
If using one of the asynchronous providers, you'll need to make use of
138
- the ``async_execute `` method and the ``async `` and ``await `` keywords
139
- as appropriate:
140
+ the ``async_execute `` method and the ``async `` and ``await `` keywords as appropriate.
141
+
142
+ .. note ::
143
+
144
+ If performance is a concern, consider using ``asyncio.gather() `` with single
145
+ concurrent requests instead of an asynchronous batch request. It will generally be
146
+ the faster option due to the overhead of batching.
140
147
141
148
.. code-block :: python
142
149
Original file line number Diff line number Diff line change
1
+ Improve batch request documentation.
You can’t perform that action at this time.
0 commit comments