Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 686 Bytes

proxy.md

File metadata and controls

32 lines (25 loc) · 686 Bytes

Using a Proxy

Using a Proxy with a Sync Client

from opensearchpy import OpenSearch, RequestsHttpConnection

OpenSearch(
    hosts=["htps://..."],
    use_ssl=True,
    verify_certs=True,
    trust_env=True,
)

Using a Proxy with an Async Client

from opensearchpy import AsyncOpenSearch, AIOHttpConnection

client = AsyncOpenSearch(
    hosts=["htps://..."],
    use_ssl=True,
    verify_certs=True,
    connection_class=AIOHttpConnection,
    trust_env=True,
)