Can <delete_object> Python API be enhanced to recu...
# dev
a
Can delete_object Python API be enhanced to recursively delete all objects under the specified path?
lakectl fs rm
command already has this functionality but Python API doesn’t.
g
Hi @Amit Kesarwani, Our python client is automatically generated, so it supports only commands supported by the lakeFS API. lakeFS API doesn’t support recursive delete (same as S3). You could use delete_objects, but you will still need to provide the list of the objects you want to delete. This functionality is also not supported in boto3, maybe this thread in stackoverflow could help (it’s for boto3 but the concept is the same).
a
@Guy Hardonag Thanks. I am just curious to know, how did we implement this in lakectl because it works with lakectl: https://docs.lakefs.io/reference/commands.html#lakectl-fs-rm
g
It sure does, lakectl is a client we implemented and has much more capabilities than the generated clients. the python client is a generated client that is automatically generated from the API.
a
👍