swh.vault.api.client module¶
-
class
swh.vault.api.client.
RemoteVaultClient
(url, api_exception=None, timeout=None, chunk_size=4096, reraise_exceptions=None, **kwargs)[source]¶ Bases:
swh.core.api.RPCClient
Client to the Software Heritage vault cache.
-
backend_class
¶ alias of
swh.vault.interface.VaultInterface
-
reraise_exceptions
: ClassVar[List[Type[Exception]]] = [<class 'swh.vault.exc.NotFoundExc'>]¶
-
batch_cook
(batch: List[Tuple[str, str]]) → int¶ Cook a batch of bundles and returns the cooking id.
-
batch_progress
(batch_id: int) → Dict[str, Any]¶ Fetch information from a batch of bundles
-
cook
(obj_type: str, obj_id: Union[str, bytes], email: Optional[str] = None) → Dict[str, Any]¶ Main entry point for cooking requests. This starts a cooking task if needed, and add the given e-mail to the notify list
-
fetch
(obj_type: str, obj_id: Union[str, bytes]) → Dict[str, Any]¶ Fetch information from a bundle
-
progress
(obj_type: str, obj_id: Union[str, bytes])¶
-
put_bundle
(obj_type: str, obj_id: Union[str, bytes], bundle)¶ Store bundle in vault cache
-
send_notif
(obj_type: str, obj_id: Union[str, bytes])¶ Send all the e-mails in the notification list of a bundle
-
set_progress
(obj_type: str, obj_id: Union[str, bytes], progress: str) → None¶ Set the cooking progress of a bundle
-
set_status
(obj_type: str, obj_id: Union[str, bytes], status: str) → None¶ Set the cooking status of a bundle
-