trulens.core.utils.text¶
trulens.core.utils.text
¶
Utilities for user-facing text generation.
Classes¶
WithIdentString
¶
Mixin to indicate _ident_str is provided.
Functions¶
format_quantity
¶
Format a quantity into a human-readable string. This will use SI prefixes. Implementation details are largely copied from millify.
PARAMETER | DESCRIPTION |
---|---|
quantity |
The quantity to format.
TYPE:
|
precision |
The precision to use. Defaults to 2.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
str
|
The formatted quantity.
TYPE:
|