quackseq.helpers#
Helper used for unit conversion.
Classes
This class provides methods for unit conversion. |
- class quackseq.helpers.UnitConverter#
This class provides methods for unit conversion.
- classmethod to_decimal(value: str) Decimal#
This method checks if the last character of the string is a suffix.
The available suffixes are: - n for nano - u for micro - m for milli
- Parameters:
value (str) – The value to be converted
- Returns:
The converted value
- Return type:
decimal.Decimal
- classmethod to_float(value: str) float#
This method checks if the last character of the string is a suffix.
The available suffixes are: - n for nano - u for micro - m for milli
- Parameters:
value (str) – The value to be converted
- Returns:
The converted value
- Return type:
float