https://hpe-storage.github.io/pydi-client/
To install the pydi-client
package, follow these steps:
-
Ensure you have Python 3.11.2 installed on your system.
-
Clone the repository or navigate to the directory containing the
pyproject.toml
file. -
Install the package using
pip
:pip install pydi-client
-
Verify the installation by running:
pip list | grep pydi-client
For detailed steps refer to the documentation
The pydi-client
package provides a DIClient
class that allows you to interact with the Data Intelligence SDK. Below are the steps to use its methods. For admin operation use DIAdminClient class:
Start by importing the DIClient
class:
from pydi_client.di_client import DIClient
Create an instance of the DIClient
:
client = DIClient(uri="https://your-api-endpoint.com")
Here are some common methods you can use:
response = client.get_collection(name="<collection name>")
print(response)
response = client.get_all_collections()
print(response)
result = client.similarity_search(query="Which Hercule Poirot book is the best",
collection_name="agatha_christie_books",
top_k=50,
access_key="acesskey***",
secret_key="secretkey***",
search_parameters={"metric": "cosine", "ef_search": "100"})
print(result)
Please file any issues, questions or feature requests you may have here (do not use this facility for support inquiries of your HPE storage product)
We value all feedback and contributions. If you find any issues or want to contribute, please feel free to open an issue or file a PR. More details in CONTRIBUTING.md
This is open source software licensed using the Apache 2.0. Please see LICENSE for details.