Skip to main content

A disk usage analyzer that prints a visual map of folder sizes

Project description

python-du

A disk usage analyzer that scans a directory and prints a visual tree map of folder sizes — right in your terminal.

Example

Installation

pip install -e .
pip uninstall python-du

Usage

python-du [path] [options]

If no path is given, the current directory is scanned.

Options

Flag Description
-d, --max-depth N Maximum tree depth to display (default: 4)
-m, --min-percent N Hide entries smaller than N% of total (default: 0.5)
--no-color Disable colored output
--sort-alpha Sort alphabetically instead of by size
--scan-depth N Limit how deep the filesystem scan goes (default: unlimited)
-L, --follow-symlinks Follow symbolic links

Examples

Scan the current directory with defaults:

python-du

Scan /var/log showing only entries above 5%, two levels deep:

python-du /var/log -d 2 -m 5

Pipe to a file (automatically disables color):

python-du /home > usage-report.txt

Publishing to PyPI

pip install build twine
python -m build
twine upload dist/*

When prompted, use __token__ as the username and your PyPI API token as the password.

To skip the prompt, create a ~/.pypirc file:

[pypi]
username = __token__
password = pypi-YOUR-TOKEN-HERE

Note: Bump the version in pyproject.toml before each upload — PyPI rejects duplicate version numbers.

Requirements

  • Python >= 3.9
  • No external dependencies

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_du-0.1.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_du-0.1.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file python_du-0.1.1.tar.gz.

File metadata

  • Download URL: python_du-0.1.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for python_du-0.1.1.tar.gz
Algorithm Hash digest
SHA256 eb052aaece0024aa1153d3b530a07218c75d80d02779c06c861743b2d87feda6
MD5 df3f393599d6d0949e2002ae5cc8dbce
BLAKE2b-256 5a1bf43b9034cb2ace55177e3c8572c918a329285b25ada13a39a88b6b2d5790

See more details on using hashes here.

File details

Details for the file python_du-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: python_du-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for python_du-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 49a5afe3676d1d0d3274274d4723d1bb5ebce55d1b763246b25fbb3fbda7b345
MD5 6fb78264a0c384263e316f177fcb6b74
BLAKE2b-256 6901d9be941f44491ad3f45a7b2b6f7867f5c856451876d4508b5a3d80b83f02

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page