Python client for data intelligence API
Project description
Python SDK for Data Intelligence solution
Documentation
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydi_client-1.0.0.tar.gz.
File metadata
- Download URL: pydi_client-1.0.0.tar.gz
- Upload date:
- Size: 24.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2d85ca33673d75b4a02461867e815fff7707200661d49fce9f24b5acd217e7e
|
|
| MD5 |
bb49949ef5e654a5d6dc425398f08b1a
|
|
| BLAKE2b-256 |
0d6addc0ffa3fdad00f2060dacaab448728d8ce51b99fb99545b99756427e7e0
|
File details
Details for the file pydi_client-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pydi_client-1.0.0-py3-none-any.whl
- Upload date:
- Size: 34.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7ef52bb6817e84e7c7acaa30f91e1e323741e545a4c9c2a12f95fb69c1606fc
|
|
| MD5 |
dd11684f63fbbc6fa4dc4b8a81321663
|
|
| BLAKE2b-256 |
e4c925f6f7e147587c026630e1101ce7fa87d4885b363a4498faa0cf66badfd3
|