swh.objstorage.backends.generator module#
- swh.objstorage.backends.generator.gen_sizes()[source]#
generates numbers according to the rought distribution of file size in the SWH archive
- swh.objstorage.backends.generator.gen_random_content(total=None, filesize=None)[source]#
generates random (file) content which sizes roughly follows the SWH archive file size distribution (by default).
- class swh.objstorage.backends.generator.RandomGeneratorObjStorage(filesize=None, total=None, **kwargs)[source]#
Bases:
ObjStorage
A stupid read-only storage that generates blobs for testing purpose.
- property content_generator#
- list_content(last_obj_id: Optional[Union[bytes, CompositeObjId]] = None, limit: Optional[int] = 10000) Iterator[CompositeObjId] [source]#