swh.objstorage.backends.in_memory module#
- class swh.objstorage.backends.in_memory.InMemoryObjStorage(**kwargs)[source]#
Bases:
ObjStorage
In-Memory objstorage.
Intended for test purposes.
- PRIMARY_HASH: Literal['sha1', 'sha256'] = 'sha1'#
- name: str = 'memory'#
Default objstorage name; can be overloaded at instantiation time giving a ‘name’ argument to the constructor
- get(obj_id: bytes | CompositeObjId) bytes [source]#
- delete(obj_id: bytes | CompositeObjId)[source]#