Human Readable
Project description
Features
File size humanization.
List humanization.
Requirements
It works in Python 3.7+.
Installation
You can install Human Readable via pip from PyPI:
$ pip install human-readable
Usage
Import the lib with:
import human_readable
File size humanization:
human_readable.file_size(1000000)
"1.0 MB"
human_readable.file_size(1000000, binary=True)
"976.6 KiB"
human_readable.file_size(1000000, gnu=True)
"976.6K"
List humanization:
human_readable.listing(["Alpha", "Bravo"], ",")
"Alpha, Bravo"
human_readable.listing(["Alpha", "Bravo"], ",", "and")
"Alpha and Bravo"
human_readable.listing(["Alpha", "Bravo", "Charlie"], ";", "or")
"Alpha; Bravo or Charlie"
Please see the Command-line Reference for details.
Contributing
Contributions are very welcome. To learn more, see the Contributor Guide.
License
Distributed under the terms of the MIT license, Human Readable is free and open source software.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Credits
This project was generated from @cjolowicz’s Hypermodern Python Cookiecutter template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
human-readable-0.1.0.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for human_readable-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58a21bbc192ea1c0e856cf4f1fd3b63540b297cbf1cc88ba2dc27036135976ec |
|
MD5 | 7636e898e50cd2d0f325a0b6fce1a31f |
|
BLAKE2b-256 | 32d0000b3684576eaee5f1784656e6ab5f933f83fc7b6a83122aa6282207c90c |