[issue31749] Request: Human readable byte amounts in the standard library

Rich report at bugs.python.org
Wed Oct 11 16:21:52 EDT 2017


Rich <miserlou+python2 at gmail.com> added the comment:

I think bitmath would be overkill to include in its entirety, but maybe there solution is a good one.

There is also:

https://pypi.python.org/pypi/byteformat/
https://pypi.python.org/pypi/datasize
https://pypi.python.org/pypi/hurry.filesize
https://pypi.python.org/pypi/hfilesize/
https://humanfriendly.readthedocs.io/en/latest/
https://pypi.python.org/pypi/humanize

and a bajillion other solutions here: https://stackoverflow.com/questions/1094841/reusable-library-to-get-human-readable-version-of-file-size and elsewhere - I think really the underscoring how common this problem is.

(Although I don't _particularly want_ this to expand beyond the scope of this single function, it does seem that given the amount of "Python for Humans" stuff out there, there could be an argument made for adding a "humanize" package into the standard library..)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31749>
_______________________________________


More information about the Python-bugs-list mailing list