hopsworks.core.opensearch_api #
[source] OpenSearchApi #
For backwards compatibility hopsworks.core.opensearch_api.OpenSearchApi is still available as hsfs.core.opensearch_api.OpenSearchApi. The use of this alias is discouraged as it is to be deprecated.
Returned by
[source] get_default_py_config #
Get the required opensearch configuration to setup a connection using the opensearch-py library.
import hopsworks
from opensearchpy import OpenSearch
project = hopsworks.login()
opensearch_api = project.get_opensearch_api()
client = OpenSearch(**opensearch_api.get_default_py_config())
| RETURNS | DESCRIPTION |
|---|---|
dict[str, Any] | A dictionary with required configuration. |