human readable是一个python库,用于将人类可读值转换为python值。
humanreadable的Python项目详细描述
humanreadable
Usage
Basic usages
Sample Code: | ^{pr 1}$ |
---|---|
Output: | ^{pr 2}$ |
Set default unit
Sample Code: | ^{pr 3}$ |
---|---|
Output: | ^{pr 4}$ |
Units
Unit | Available specifiers (str) |
---|---|
days | ^{tt2}$/^{tt3}$/^{tt4}$ |
hours | ^{tt5}$/^{tt6}$/^{tt7}$ |
minutes | ^{tt8}$/^{tt9}$/^{tt10}$/^{tt11}$/^{tt12}$ |
seconds | ^{tt13}$/^{tt14}$/^{tt15}$/^{tt16}$/^{tt17}$ |
milliseconds | ^{tt18}$/^{tt19}$/^{tt20}$/^{tt21}$/^{tt22}$ |
microseconds | ^{tt23}$/^{tt24}$/^{tt25}$/^{tt26}$/^{tt27}$ |
Unit | Available specifiers (str) |
---|---|
bps | ^{tt29}$/^{tt30}$ |
Kbps | ^{tt31}$/^{tt32}$ |
Kibps | ^{tt33}$/^{tt34}$ |
Mbps | ^{tt35}$/^{tt36}$ |
Mibps | ^{tt37}$/^{tt38}$ |
Gbps | ^{tt39}$/^{tt40}$ |
Gibps | ^{tt41}$/^{tt42}$ |
Tbps | ^{tt43}$/^{tt44}$ |
Tibps | ^{tt45}$/^{tt46}$ |
Installation
Install from PyPI
pip install humanreadable
Install from PPA (for Ubuntu)
sudo add-apt-repository ppa:thombashi/ppa sudo apt update sudo apt install python3-humanreadable