Use this file to discover all available pages before exploring further.
To create an encrypted index, you need to specify an index name (must be unique) and an index key:
from cyborgdb import Client# Create a clientclient = Client( base_url='http://localhost:8000', api_key='your-api-key')# Generate an encryption key for the indexindex_key = client.generate_key()# Create an encrypted indexindex = client.create_index( index_name="my_index", index_key=index_key)
This creates a new encrypted index with the IVFFlat type by default. For more details on IVFFlat and other index options, see Configure an Encrypted Index.
The example above creates a random 32 byte (256-bit) index key.
This is fine for evaluation purposes, but for production use, we recommend that you use an HSM or KMS solution.
For more details, see Managing Encryption Keys.
The service-based SDKs handle caching automatically on the server side. Unlike the embedded SDKs, you don’t need to specify cache sizes when creating indexes.The CyborgDB service optimizes query performance through:
To use automatic embedding generation, use the Docker Service or install with pip install cyborgdb-service[embeddings]
All Client SDKs support automatic embedding generation. You can specify an embedding model when creating the index:
from cyborgdb import Client, IndexIVF# Create a clientclient = Client( base_url='http://localhost:8000', api_key='your-api-key')# Generate an encryption key for the indexindex_key = client.generate_key()# Set embedding model (from HuggingFace)embedding_model = "sentence-transformers/all-MiniLM-L6-v2"# Create an encrypted index with managed embedding generationindex = client.create_index( index_name="my_index", index_key=index_key, embedding_model=embedding_model)