swh.objstorage.objstorage module#
- swh.objstorage.objstorage.objid_to_default_hex(obj_id: Union[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: Union[Mapping[bytes, bytes], Iterable[Tuple[Union[bytes, CompositeObjId], bytes]]], check_presence: bool = True) Dict [source]#
- abstract delete(obj_id: Union[bytes, CompositeObjId])[source]#
- list_content(last_obj_id: Optional[Union[bytes, CompositeObjId]] = None, limit: Optional[int] = 10000) Iterator[CompositeObjId] [source]#