Files
opensearch-pyd/guides/proxy.md
T
Daniel (dB.) Doubrovkine 7a638cdafc Align pool_maxsize for different connection pool implementations. (#535)
* Align pool_maxsize for different connection pool implementations.

Signed-off-by: dblock <dblock@amazon.com>

* Document connection classes and settings.

Signed-off-by: dblock <dblock@amazon.com>

* Undo change in async for backwards compatibility.

Signed-off-by: dblock <dblock@amazon.com>

* Fix: typo.

Signed-off-by: dblock <dblock@amazon.com>

---------

Signed-off-by: dblock <dblock@amazon.com>
2023-10-12 18:55:31 -04:00

32 lines
686 B
Markdown

- [Using a Proxy](#using-a-proxy)
- [Using a Proxy with a Sync Client](#using-a-proxy-with-a-sync-client)
- [Using a Proxy with an Async Client](#using-a-proxy-with-an-async-client)
# Using a Proxy
## Using a Proxy with a Sync Client
```python
from opensearchpy import OpenSearch, RequestsHttpConnection
OpenSearch(
hosts=["htps://..."],
use_ssl=True,
verify_certs=True,
trust_env=True,
)
```
## Using a Proxy with an Async Client
```python
from opensearchpy import AsyncOpenSearch, AIOHttpConnection
client = AsyncOpenSearch(
hosts=["htps://..."],
use_ssl=True,
verify_certs=True,
connection_class=AIOHttpConnection,
trust_env=True,
)
```