Archive processing
- class oceanai.modules.lab.unzip.UnzipMessages(lang: str = 'ru', color_simple: str = '#666', color_info: str = '#1776D2', color_err: str = '#FF0000', color_true: str = '#008001', bold_text: bool = True, text_runtime: str = '', num_to_df_display: int = 30)[source]
Bases:
CoreClass for messages
- Parameters:
lang (str) – See
langcolor_simple (str) – See
color_simplecolor_info (str) – See
color_infocolor_err (str) – See
color_errcolor_true (str) – See
color_truebold_text (bool) – See
bold_textnum_to_df_display (int) – See
num_to_df_displaytext_runtime (str) – See
text_runtime
- class oceanai.modules.lab.unzip.Unzip(lang: str = 'ru', color_simple: str = '#666', color_info: str = '#1776D2', color_err: str = '#FF0000', color_true: str = '#008001', bold_text: bool = True, text_runtime: str = '', num_to_df_display: int = 30)[source]
Bases:
UnzipMessagesClass for archive processing
- Parameters:
lang (str) – See
langcolor_simple (str) – See
color_simplecolor_info (str) – See
color_infocolor_err (str) – See
color_errcolor_true (str) – See
color_truebold_text (bool) – See
bold_textnum_to_df_display (int) – See
num_to_df_displaytext_runtime (str) – See
text_runtime
- __progressbar_unzip(path_to_zipfile: str, progress: float, clear_out: bool = True, last: bool = False, out: bool = True) None
Progressbar
Note
private method
- Parameters:
path_to_zipfile (str) – Full path to the archive
progress (float) – Percentage of progress (from 0.0 to 100.0)
clear_out (bool) – Clearing the output
last (bool) – Replacing the last message
out (bool) – Display
- Return type:
None
- _unzip(path_to_zipfile: str, new_name: str | None = None, force_reload: bool = True, out: bool = True) bool[source]
Unzipping the archive (without clearing the message output history in the Jupyter cell)
Note
protected method
- Parameters:
path_to_zipfile (str) – Full path to the archive
new_name (str) – Directory name for unzipping
force_reload (bool) – Forced unzipping
out (bool) – Display
- Returns:
True if unzipping was successful, otherwise False
- Return type:
bool
- property path_to_unzip: str
Getting a directory for unzipping
- Returns:
Unzip directory
- Return type:
str
- unzip(path_to_zipfile: str, new_name: str | None = None, force_reload: bool = True, out: bool = True) bool[source]
Unzipping an archive
- Parameters:
path_to_zipfile (str) – Full path to the archive
new_name (str) – Directory name for unzipping
force_reload (bool) – Forced unzipping
out (bool) – Display
- Returns:
True if unzipping was successful, otherwise False
- Return type:
bool