Client class provides an interface to initialize, create, load and list Encrypted Indexes. Encrypted Indexes, in turn, expose data-related functionality such as upserting, querying, and deleting.
Creating the Client
To create the client, you must supply your API key and a backing store (StorageConfig) which it will use to persist all encrypted index data. The simplest option is an in-memory store, which is ephemeral and ideal for development and tests:
The C++
cyborg::Client is non-copyable and non-movable (it owns the keystore handles). Construct it in place, or hold it via std::unique_ptr<cyborg::Client> if you need to move ownership.Persistent Backing Stores
For persistence, use a disk-backed or S3 backing store instead of memory.StorageConfig exposes three static factories: memory(), disk(path) (local, RocksDB-backed), and s3(bucket) (AWS S3 or S3-compatible).
credentials= (Python) / leave credentials unset in S3Options (C++) to use the AWS default credential provider chain (environment variables, ~/.aws/credentials, EC2 instance profile, EKS IRSA). The disk store also accepts cache options (cache_vectors, cache_metadata, cache_ids) to keep hot data in memory.
Setting Device Configurations
CyborgDB can be accelerated in two ways:- CPU Multithreading (via
OpenMP) -> can scale with the number of CPU cores available - GPU Acceleration (via
CUDA&cuVS) -> can increase the speed of certain operations (e.g., ingestion) by an order of magnitude.
cpu_threads and gpu_config parameters:
gpu_config can only be set if running on a CUDA-enabled system with the CUDA driver installed. Use GPUConfig to specify which operations (upsert, train, query) should use GPU acceleration.cpu_threads will use all available cores, and gpu_config will be None (no GPU acceleration).
API Reference
For more information on theClient class, refer to the API Reference:
Python API Reference
API reference for
Client in PythonC++ API Reference
API reference for
cyborg::Client in C++