From df3a39f1a0904f9788a3fe87b2b4069d594cc866 Mon Sep 17 00:00:00 2001 From: Sai Medhini Reddy Maryada <117196660+saimedhi@users.noreply.github.com> Date: Tue, 28 Mar 2023 10:21:07 -0700 Subject: [PATCH] Updated user_guide for async client (#340) Signed-off-by: saimedhi --- CHANGELOG.md | 2 +- USER_GUIDE.md | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 902285d6..29a8a145 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 00a2a122..68ddd217 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -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