This action is irreversible. Proceed with caution.
To delete an exiting encrypted index, you can load it and then call the delete_index() method.
Copy
Ask AI
import cyborgdb_core as cyborgdb# or import cyborgdb_lite as cyborgdbimport secrets# Using `memory` storage for this exampleindex_location = cyborgdb.DBConfig("memory") config_location = cyborgdb.DBConfig("memory")# Get your API keyapi_key = "your_api_key_here" # Replace with your actual API key# Create a clientclient = cyborgdb.Client( api_key=api_key, index_location=index_location, config_location=config_location)# Provide the index key used when creating the indexindex_key = secrets.token_bytes(32)# Create an encrypted indexindex = client.load_index( index_name="my_index", index_key=index_key)# Delete the indexindex.delete_index()