Client is the main class exposed by CyborgDB. It exposes the functionality necessary to create, load, list and delete indexes. Operations within encrypted indexes (such as upsert and query) are contained within the EncryptedIndex class returned by create_index and load_index.
Constructor
Client instance.
Parameters
A single
storage_config replaces the former index_location / config_location / items_location trio. The store is shared across all per-index keystores.Exceptions
ValueError
ValueError
- Throws if the
cpu_threadsparameter is less than0. - Throws if the
StorageConfigis invalid. - Throws if the GPU is not available when
gpu_configis set.
RuntimeError
RuntimeError
- Throws if the backing store is not available.
- Throws if the Client could not be initialized.
Example Usage
Methods
get_cpu_threads()
Returns the number of CPU threads configured for this client.Returns
int: The number of CPU threads.
Example Usage
is_gpu_enabled()
Checks if GPU acceleration is enabled for this client.Returns
bool: True if GPU acceleration is enabled, False otherwise.
Example Usage
get_gpu_config()
Returns the GPU operations configuration for this client.Returns
GPUConfig: The GPU operations configuration.