-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdocument_deleter.py
More file actions
31 lines (25 loc) · 941 Bytes
/
document_deleter.py
File metadata and controls
31 lines (25 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""Module for the document deletion endpoint."""
from abc import ABC, abstractmethod
class DocumentDeleter(ABC):
"""Abstract base class for document deletion endpoint."""
@abstractmethod
async def adelete_document(
self,
identification: str,
remove_from_key_value_store: bool = True,
remove_from_storage: bool = True,
) -> None:
"""
Delete a document by its identification asynchronously.
Parameters
----------
identification : str
The unique identifier of the document to be deleted.
remove_from_key_value_store : bool, optional
If True, the document will also be removed from the key-value store (default is True).
remove_from_storage : bool, optional
If True, the document will also be removed from the file storage (default is True).
Returns
-------
None
"""