swh.objstorage.objstorage module#
- swh.objstorage.objstorage.objid_to_default_hex(obj_id: bytes | CompositeObjId) str [source]#
Converts SHA1 hashes and multi-hashes to the hexadecimal representation of the SHA1.
- class swh.objstorage.objstorage.ObjStorage(*, allow_delete=False, **kwargs)[source]#
Bases:
object
- add_batch(contents: Mapping[bytes, bytes] | Iterable[Tuple[bytes | CompositeObjId, bytes]], check_presence: bool = True) Dict [source]#
- abstract delete(obj_id: bytes | CompositeObjId)[source]#
- list_content(last_obj_id: bytes | CompositeObjId | None = None, limit: int | None = 10000) Iterator[CompositeObjId] [source]#