hbp_nrp_commons.ZipUtil module¶
This module provides helper functions to handle zip
-
class
ZipUtil
[source]¶ Bases:
object
This class provides helper functions to handle zip
-
static
create_from_path
(path, dest_zip_file)[source]¶ Create a zip from a path
- Parameters
path – path to be compressed
dest_zip_file – file name and path to the zip archive
- Returns
The created zip file
-
static
extractall
(zip_target, extract_to, overwrite=False, flatten=False)[source]¶ Extract a zip in the given location
- Parameters
zip_target – absolute path of the zip file or BytesIO object
extract_to – absolute path to the folder where to unzip
overwrite – boolean to indicate whether to overwrite the existing contents
- Returns
-
static