Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 329 Bytes

README.md

File metadata and controls

23 lines (19 loc) · 329 Bytes

octet

Object-oriented way to represent digital sizes (bits and bytes)

Installation

pip install octet

Examples

>>> from octet import *
>>> GiB(1024).convert_to(TiB)
TiB(1)
>>> size = 1024 * KiB()
>>> size.to_minor_units()
b(8388608)
>>> KiB(1) > 1000 * B()
True
>>> KiB(1) > 1025 * B()
False