PynamoDB
PynamoDB copied to clipboard
Question: Is there a way to wait until a table is deleted?
Hi ! I am new to PynamoDB and I was wondering if there is a way to wait until a table is deleted. There is a parameter for create_table, however, It seems there is no way to wait until a table is deleted. I can use dynamodb waiter instead but it would be nice if there is the same feature as create_table! Thank you for the kind library and your best efforts.
@classmethod
def create_table(cls, wait=False, read_capacity_units=None, write_capacity_units=None):
@classmethod
def delete_table(cls):
"""
Delete the table for this model
"""
return cls._get_connection().delete_table()
Are there any updates on that? @ikonst Any suggestion on how that might be implemented?
I'm curious as to the motivation. In what cases is this useful? (especially in light of the scope of the library)
I think the idea behind that request is to have two methods with consistent implementation.
As of now, we have an option to wait in the create_table()
but there is no such option in the delete_table()
which introduce some confusion (especially for the beginners).
I'm totally fine using a custom workaround in my code. And I think that is not a common use-case for that library and for DynamoDB in general, but it will make implementation a bit intuitive.