Utilities (xentica.utils)

The collection of utilities.

Formatters (xentica.utils.formatters)

The collection of formatters.

xentica.utils.formatters.sizeof_fmt(num, suffix='')

Format the number to a humanized order of magnitude.

For example, 11234 become 11.23K.

Parameters:
  • num – The positive integer.
  • suffix – Additional suffix added to the resulting string.
Returns:

Formatted number as a string.