项目作者: tslight

项目描述 :
Python Disk Usage Calculator
高级语言: Python
项目地址: git://github.com/tslight/pdu.git
创建时间: 2018-07-22T15:22:42Z
项目社区:https://github.com/tslight/pdu

开源协议:ISC License

下载


PYTHON DISK USAGE

Takes a path as an argument and returns it’s total disk usage recursively.

INSTALLATION

pip install pdu

CLI USAGE

  1. usage: pdu [-h] [path]
  2. Python Disk Usage Calculator.
  3. positional arguments:
  4. path A valid path.
  5. optional arguments:
  6. -h, --help show this help message and exit

PYTHON USAGE

  1. path = '/path/to/some/file/or/directory'
  2. from pdu import du
  3. human_readable_size = du(path)
  4. from pdu import calc
  5. size_in_bytes = calc(path)
  6. from pdu import convert
  7. human_readable_units = convert(bytes)