pyguymer3.convert_bytes_to_pretty_bytes¶
- pyguymer3.convert_bytes_to_pretty_bytes(uglySize: int, /) tuple[float, str][source]¶
Convert a value of bytes to a pretty value of bytes with some units
This function reads in a value of bytes and returns the same value expressed prettily for a human to read with some units.
- Parameters:
uglySize (int) – the value of bytes
- Returns:
prettySize (float) – the value of bytes in unit
unit (str) – the units of prettySize
Notes
Copyright 2017 Thomas Guymer [1]
References
Examples
>>> pyguymer3.convert_bytes_to_pretty_bytes(1536) (1.5, 'KiB')