justbytes package

Module contents

The public interface of the justbytes package.

Contents:

  • Unit constants in SI and binary units
    • Universal:
      • B
    • SI:
      • KB
      • MB
      • GB
      • TB
      • PB
      • EB
      • ZB
      • YB
    • Binary:
      • KiB
      • MiB
      • GiB
      • TiB
      • PiB
      • EiB
      • ZiB
      • YiB
    • UNITS: _constants.UNITS()

  • Rounding constants, with meaning as for the Python decimal module:
    • ROUND_DOWN
    • ROUND_HALF_DOWN
    • ROUND_HALF_UP
    • ROUND_UP
    • ROUNDING_METHODS
  • Configuration classes:
    • StrConfig: _config.StrConfig
  • Exception classes:
  • Range classes:

All parts of the public interface of justbytes must be imported directly from the top-level justbytes module, as:

from justbytes import Range
from justbytes import KiB
from justbytes import RangeError

s = Range(24, KiB)
try:
    s + 32
except RangeError as e:
    raise e

Table Of Contents

Previous topic

justbytes

Next topic

justbytes._util package

This Page