Skip to main content

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

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.2.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.2-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for python_du-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a74e7e584accc5941c4e0280465d27af63198c7763cf1d2519646e2deda9dda0
MD5 100b663b0bd064c92c6469b9b27ca93b
BLAKE2b-256 e5d649abccaf877ad8eb0a04e7670fdca3bdbdfbb03294d2eeb395fc52823527

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for python_du-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0344b3085e6a55bef2a337c580596de895015a69e6328343205d7abff07d7971
MD5 3f94a2a3d648d2d0ba66bf0c5abc612f
BLAKE2b-256 8f2aa5b25c601c6504ca67390d46c6057e919c77841de4ae8b0836353e44b851

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page