Updated user_guide for async client (#340)

Signed-off-by: saimedhi <saimedhi@amazon.com>
This commit is contained in:
Sai Medhini Reddy Maryada
2023-03-28 10:21:07 -07:00
committed by GitHub
parent 51eb6e5cca
commit df3a39f1a0
2 changed files with 11 additions and 4 deletions
+10 -3
View File
@@ -43,6 +43,12 @@ Then import it like any other module:
from opensearchpy import OpenSearch
```
To add the async client to your project, install it using [pip](https://pip.pypa.io/):
```bash
pip install opensearch-py[async]
```
If you prefer to add the client manually or just want to examine the source code, see [opensearch-py on GitHub](https://github.com/opensearch-project/opensearch-py).
@@ -478,9 +484,10 @@ print(response)
Make sure to use `AsyncOpenSearch` with the `AsyncHttpConnection` connection class with the async `AWSV4SignerAsyncAuth` signer.
```bash
pip install opensearch-py[async]
```
- Requires opensearch-py[async]
Here is the sample code that uses `AWSV4SignerAsyncAuth` -
```python
from opensearchpy import AsyncOpenSearch, AsyncHttpConnection, AWSV4SignerAsyncAuth