swh.objstorage.backends.in_memory module#

class swh.objstorage.backends.in_memory.InMemoryObjStorage(**args)[source]#

Bases: ObjStorage

In-Memory objstorage.

Intended for test purposes.

PRIMARY_HASH: typing_extensions.Literal[sha1] = 'sha1'#
check_config(*, check_write)[source]#
add(content: bytes, obj_id: Union[bytes, CompositeObjId], check_presence: bool = True) None[source]#
get(obj_id: Union[bytes, CompositeObjId]) bytes[source]#
check(obj_id: Union[bytes, CompositeObjId]) None[source]#
delete(obj_id: Union[bytes, CompositeObjId])[source]#