Skip to content

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

License

Notifications You must be signed in to change notification settings

EnriqueSoria/octet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages