Reorganize documentation and add samples. (#447)

Signed-off-by: dblock <[email protected]>
This commit is contained in:
Daniel (dB.) Doubrovkine
2023-07-24 10:23:51 -07:00
committed by GitHub
parent 5866880c81
commit 58217d98ff
18 changed files with 1097 additions and 691 deletions
+33
View File
@@ -0,0 +1,33 @@
- [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,
connection_class=RequestsHttpConnection,
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,
)
```