swh.objstorage.proxies.readonly module#

class swh.objstorage.proxies.readonly.ReadOnlyProxyObjStorage(storage: ObjStorageInterface | Dict, **kwargs)[source]#

Bases: ObjStorage

Filter that disable write operation of the storage.

Writes will always succeed without doing any actual write operations.

name: str = 'read-only'#

Default objstorage name; can be overloaded at instantiation time giving a ‘name’ argument to the constructor

get(obj_id, *args, **kwargs)[source]#
check(obj_id, *args, **kwargs)[source]#

Check if a content is found and recompute its hash to check integrity.

check_config(*, check_write)[source]#
add(*args, **kwargs)[source]#
restore(*args, **kwargs)[source]#
delete(*args, **kwargs)[source]#