Configuration of the justbytes package.
Bases: object
Superficial aspects of display.
Bases: object
Configuration for input of Sizes.
Specifies rounding unit and method for Sizes constructed from user input.
Bases: object
Configuration for Size class.
Default configuration for interpreting input values.
Default configuration for string display.
Set configuration for superficial aspects of display.
Parameters: | config (DisplayConfig) – a configuration object |
---|
Set the configuration for input method for all Size objects.
:param InputConfig config: a configuration object
Bases: object
Configuration for __str__ method.
If max_places is set to None, all non-zero digits after the decimal point will be shown. Otherwise, max_places digits will be shown.
min_value sets the smallest value allowed. If min_value is 10, then single digits on the lhs of the decimal will be avoided if possible. In that case, 9216 KiB is preferred to 9 MiB. However, 1 B has no alternative. If min_value is 1, however, 9 MiB is preferred. If min_value is 0.1, then 0.75 GiB is preferred to 768 MiB, but 0.05 GiB is still displayed as 51.2 MiB.