BalancedDiscStorageZ class¶
-
class
BalancedDiscStorage.balanced_disc_storage_z.BalancedDiscStorageZ(path)¶ Bases:
BalancedDiscStorage.balanced_disc_storage.BalancedDiscStorageThis class is the same as
BalancedDiscStorage, but it also allows adding the.zipfiles, which are unpacked to proper path in storage.-
max_zipfiles= None¶ How many files may be in .zip
-
add_archive_as_dir(zip_file_obj)¶ Add archive to the storage and unpack it.
Parameters: zip_file_obj (file) – Opened file-like object.
Returns: Path where the zip_file_obj was unpacked wrapped in
PathAndHashstructure.Return type: obj
Raises: ValueError– If there is too many files in .zip archive. See_max_zipfilesfor details.AssertionError– If the zip_file_obj is not file-like object.
-