api.delete_resources, Cloudinary has no attribute 'api'
Hello,
I'm trying to delete resources using the Python SDK and the documentation here: https://cloudinary.com/documentation/admin_api#delete_resources
My code is identical to the example, `cloudinary.api.delete_resources([public_ids_to_delete])` but I'm receiving the error "Unable to retrieve images with exception module 'cloudinary' has no attribute 'api'".
How can I call the `delete_resources` method?
Thanks
0
-
Hi James,
The error message indicates that you have to import the cloudinary.api in your application, as shown in the code below:
import cloudinary
import cloudinary.api
# Initialize cloudinary.config(...)
...
cloudinary.api.delete_resources(["image1", "image2"])You can check this link for the demo example: https://www.anyfiddle.com/p/ecp_dev/5etus6zeAlso, kindly refer to the following link for the Python SDK integration: https://cloudinary.com/documentation/django_integrationBest regards,Eric1
Post is closed for comments.
Comments
1 comment