fridom.framework.utils.formatting.humanize_number

fridom.framework.utils.formatting.humanize_number#

fridom.framework.utils.formatting.humanize_number(value: float, unit: str)[source]#

Format a number in human readable format.

Description#

This function formats a number in human readable format. The number is converted to a string with the appropriate unit (e.g., meters, seconds).

Parameters#

valuefloat

The number to format.

unitstr

The unit of the number (e.g., meters, seconds).

Returns#

str

The formatted number with the appropriate unit.