Utility Functions
Utils
Instantiate utilities.
Source code in honeydew/utils.py
__init__(name='')
convert_dt_to_epoch(dt)
Convert datetime in UTC time zone to epoch (unix time) Args: dt (datetime): datetime Returns: result (int): epoch or unix time
convert_epoch_to_dt(epoch)
Convert epoch to datetime Args: epoch (int): epoch or unix time Returns: result (datetime): datetime
compress(dir_path, file_pattern='*', delete_after_compression=False)
Compress files with pattern or prefix from a directory. Type "*" for all files. Args: dir_path (str): Directory path file_pattern (str): File pattern or prefix delete_after_zip (bool): Delete original files after compression
Source code in honeydew/utils.py
compress_parallel(dir_path, file_pattern='*', delete_after_compressing=False)
Compress files with pattern or prefix from a directory parallely. Type "*" for all files.