from appwrite.client import Client from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID client.set_key('') # Your secret API key databases = Databases(client) result = databases.update_relationship_attribute( database_id = '', collection_id = '', key = '', on_delete = RelationMutate.CASCADE, # optional new_key = '' # optional )