lump.humanreadable module¶
-
lump.humanreadable.
format_binary
(num, suffix=None, *, base=1024, midfix='i', prefixes='KMGTPEZY', precision=None)¶ Format a number using prefixes according to base (by default using metric prefixes, and a suffix of ‘B’, representing the unit of digital information) :return: Formatted number :rtype: str
-
lump.humanreadable.
format_metric
(num, suffix=None, base=None, midfix=None, prefixes=None, precision=None)[source]¶ Format a number using prefixes according to base (by default using metric prefixes, and a suffix of ‘B’, representing the unit of digital information) :return: Formatted number :rtype: str