Python SDK for Data Intelligence solution
Documentation
https://hpe-storage.github.io/pydi-client/
API reference
https://hpe-storage.github.io/pydi-client/api/reference/
Installation
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.tomlfile. -
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
Usage
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:
Importing the DIClient
Start by importing the DIClient class:
from pydi_client.di_client import DIClient
Initializing the Client
Create an instance of the DIClient:
client = DIClient(uri="https://your-api-endpoint.com")
Using DIClient Methods
Here are some common methods you can use:
Example: Get collection
response = client.get_collection(name="<collection name>")
print(response)
Example: get collections
response = client.get_all_collections()
print(response)
Example: similarity search on collection
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)
Community
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)
Contributing
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
License
This is open source software licensed using the Apache 2.0. Please see LICENSE for details.
Release files for pydi-client 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pydi_client-1.4.0.tar.gz | 29.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pydi_client-1.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 69.1 kB
Release files / pydi_client-1.4.0.tar.gz
| Download URL | pydi_client-1.4.0.tar.gz |
|---|---|
| Size | 29.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0929c0408a288d59467d3544981f47d908eeba85d3b6dbda2427dc61902a8c8
|
|
BLAKE2b-256 checksum How to use checksums |
c202d19429f0fcebc60a65c7bab0979f877e84f0037203308139b0c0836a06ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pydi_client-1.4.0-py3-none-any.whl
| Download URL | pydi_client-1.4.0-py3-none-any.whl |
|---|---|
| Size | 40.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
862d6bb1f40897d62185084820a3387f792959b760612c981af68cf4d31decb0
|
|
BLAKE2b-256 checksum How to use checksums |
378f00bb47bab126cd794b9398d273f999ae5c75f8d57a70e80898373fc0f5e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|