justbytes._constants module
Constants used by the justbytes package.
- Categories of constants:
- Rounding methods
- Size units, e.g., Ki, Mi
-
justbytes._constants.B = B
The universal unit, bytes.
-
class justbytes._constants.BinaryUnits
Bases: object
Class to store binary unit constants.
-
EiB = EiB
-
FACTOR = 1024
-
GiB = GiB
-
KiB = KiB
-
MiB = MiB
-
PiB = PiB
-
TiB = TiB
-
classmethod UNITS()
Units of this class.
-
YiB = YiB
-
ZiB = ZiB
-
class justbytes._constants.DecimalUnits
Bases: object
Class to store decimal unit constants.
-
EB = EB
-
FACTOR = 1000
-
GB = GB
-
KB = kB
-
MB = MB
-
PB = PB
-
TB = TB
-
classmethod UNITS()
Units of this class.
-
YB = YB
-
ZB = ZB
-
justbytes._constants.UNITS()
All unit constants.
-
class justbytes._constants.Unit(factor, prefix, abbr)
Bases: object
Class to encapsulate unit information.
-
abbr
abbreviation for unit, precedes ‘B’
-
factor
numeric multiple of bytes
-
prefix
prefix for ‘bytes’