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
+1 -1
View File
@@ -9,7 +9,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Removed
### Fixed
- Fixed import cycle when importing async helpers ([#311](https://github.com/opensearch-project/opensearch-py/pull/311))
- Fixed userguide for async client ([#311](https://github.com/opensearch-project/opensearch-py/pull/311))
- Fixed userguide for async client ([#340](https://github.com/opensearch-project/opensearch-py/pull/340))
### Security
- Fixed CVE-2022-23491 reported in opensearch-dsl-py ([#295](https://github.com/opensearch-project/opensearch-py/pull/295))
- Update ci workflows ([#318](https://github.com/opensearch-project/opensearch-py/pull/318))
+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