swh.vault.backend module#
- class swh.vault.backend.VaultBackend(**config)[source]#
Bases:
object
Backend for the Software Heritage Vault.
- current_version = 4#
- progress(bundle_type: str, swhid: CoreSWHID, raise_notfound: bool = True) Optional[Dict[str, Any]] [source]#
- create_task(bundle_type: str, swhid: CoreSWHID, sticky: bool = False)[source]#
Create and send a cooking task
- add_notif_email(bundle_type: str, swhid: CoreSWHID, email: str)[source]#
Add an e-mail address to notify when a given bundle is ready
- cook(bundle_type: str, swhid: CoreSWHID, *, sticky: bool = False, email: Optional[str] = None) Dict[str, Any] [source]#
- is_available(bundle_type: str, swhid: CoreSWHID)[source]#
Check whether a bundle is available for retrieval
- fetch(bundle_type: str, swhid: CoreSWHID, raise_notfound=True) Optional[bytes] [source]#
Retrieve a bundle from the cache
- update_access_ts(bundle_type: str, swhid: CoreSWHID)[source]#
Update the last access timestamp of a bundle