human readable是一个python库,用于将人类可读值转换为python值。

humanreadable的Python项目详细描述


Summary

human readable是一个python库,用于将人类可读值转换为python值。

PyPI package versionhttps://img.shields.io/pypi/pyversions/humanreadable.svgLinux CI statushttps://img.shields.io/appveyor/ci/thombashi/humanreadable/master.svg?label=Windows%20CITest coverage

Supported Unites

  • 时间(天、小时、分钟、秒…)
  • 位/秒

Usage

Basic usages

Sample Code:^{pr 1}$
Output:^{pr 2}$

Set default unit

Sample Code:^{pr 3}$
Output:^{pr 4}$

Units

Available units for ^{tt1}$
UnitAvailable 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}$
Available units for ^{tt28}$
UnitAvailable 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

Dependencies

python 2.7+或3.5+

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何反射地迭代数组字段?   java NamedQuery错误“具有给定标识符的多行:1”   java无法使用单独类中的计时器更新TextView   兼容性什么时候可以很快使用新的Java功能?   java二叉树路径和   java矩形的性能   java我想从同一个子表在主表中添加两个外键   java如何获取基于特定日期的所有数据?   java javafx、OO编程规则和写入变量类型的选择   java使用带枚举的switch语句   java异步任务生成运行时异常   java为什么JLabel不显示下划线字符?   java如何解析具有可变参数号的函数?   带有按钮的java JavaFX自定义列表单元格:未调用处理程序   java Modelmapper无法映射整个模型?   传递给持久化的java分离实体,包含LatLng列表