Skip to main content
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

Initializes a new CyborgDB 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

  • Throws if the cpu_threads parameter is less than 0.
  • Throws if the StorageConfig is invalid.
  • Throws if the GPU is not available when gpu_config is set.
  • Throws if the backing store is not available.
  • Throws if the Client could not be initialized.

Example Usage

Use StorageConfig.memory() for ephemeral testing, StorageConfig.disk("/path") for local persistence, or StorageConfig.s3("bucket") for S3-backed persistence. See StorageConfig.

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.

Example Usage