# Import cyborgdb_core or cyborgdb_lite:
import cyborgdb_core as cyborgdb
import cyborgdb_lite as cyborgdb
import secrets
# Using `memory` storage for this example
index_location = cyborgdb.DBConfig("memory")
config_location = cyborgdb.DBConfig("memory")
# Get your API key
api_key = "your_api_key_here" # Replace with your actual API key
# Create a client
client = cyborgdb.Client(api_key, index_location, config_location)
# Generate an encryption key for the index
index_key = secrets.token_bytes(32)
# Set max cache size at 1MB
max_cache_size = 1000000
# Create an encrypted index
index = client.load_index("my_index", index_key, max_cache_size)