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 with the humanized order of magnitude.

In example, 11234 become 11.23K.

Parameters:
  • num – The positive integer.
  • suffix – Additional suffix to add to formatted string.
Returns:

Formatted number as a string.