Skip to main content

Human readable numbers

Project description

khnum 𓎹𓃝

Khnum image

the god of human readable numbers


pip install khnum


import khnum


>>> khnum.cnum(1234567890)
>>> khnum.hnum(1234567890)
>>> khnum.hnum(1234567890, 'bytes')
>>> khnum.hnum(1234567890, 'si')
>>> num = khnum.num(1234567890, 'b')
>>> print(num)
    "_num": 1234567890,
    "cnum": "1,234,567,890",
    "hnum": "1.2GB",
    "type": "<class 'int'>",
    "units": "b"


$ pydoc khnum
>>> help(khnum)


$ pytest



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for khnum, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size khnum-0.0.3-py3-none-any.whl (4.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size khnum-0.0.3.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page