Skip to main content

statsfolder

Your storage, understood. A Python package and CLI that recursively explores a folder and turns its contents into a polished, self-contained HTML dashboard. Reports work offline: no CDN, external fonts, telemetry, or file uploads.

Quick start

Requires Python 3.11+ and uv.

uv sync
uv run statsfolder ~/Downloads --open
uv run statsfolder ./my-project -o reports/project.html \
  --exclude .git --exclude .venv --exclude '*.pyc'

The default output is statsfolder-report.html in the current directory. --open launches your browser; otherwise just open the saved HTML file. Existing output files are replaced and excluded from the scan automatically. Use uv run python -m statsfolder as an alternative entry point.

Optional Streamlit dashboard

uv sync --extra streamlit
uv run statsfolder ~/Downloads --streamlit

Choose a folder, adjust exclusions, and click Analyze folder. Explore charts, filter the inventory, and download the same offline HTML report. Paths refer to the machine running Streamlit, not to a remote browser's computer. Run this UI only on a trusted local machine; it has access to that machine's files. Stop the server with Ctrl+C.

Other options

uv run statsfolder . --exclude-hidden --exclude node_modules
uv run statsfolder . --title "Project storage audit" -o audit.html
uv run statsfolder . --json -o inventory.json
uv run statsfolder --help

For an installed wheel, use statsfolder directly. Optional UI dependencies can also be installed with pip install 'statsfolder[streamlit]'.

To install the console command as a standalone uv tool from this checkout:

uv build
uv tool install ./dist/statsfolder-0.1.0-py3-none-any.whl
statsfolder ~/Downloads --open

Install the wheel with its [streamlit] extra instead if you want the standalone tool to include the interactive UI.

What's in the report?

  • Total logical file size, file/folder counts, average size, empty files, and links
  • Storage composition by extension, including extensionless files
  • The 20 largest files and 20 largest recursive folder footprints
  • A complete file/folder inventory with path search, kind filters, and sorting
  • Modification timestamps in UTC, scan duration, exclusions, and explicit errors
  • An all-folders modification timeline below the existing tables, oldest first, with a newest-first option, latest descendant file change, file counts, and sizes
  • Responsive layout, light/dark toggle, accessible controls, and print styling

Python API

from statsfolder import scan, write_report

result = scan("./my-project", exclude=(".git", ".venv"), include_hidden=True)
print(result.total_size, len(result.files), result.folder_count)
print(result.file_types())
report_path = write_report(result, "reports/project.html", title="Project audit")

for error in result.errors:
    print(f"Could not inspect {error.path}: {error.message}")

render_report(result) returns HTML as a string; result.to_dict() provides a JSON-serializable snapshot. Entries use root-relative POSIX paths.

Scan semantics

  • Hidden files are included unless --exclude-hidden is specified.
  • --exclude is repeatable. Case-sensitive glob patterns match the entry name or root-relative path. A matching folder is pruned, including its entire subtree. A pruned subtree counts as one excluded entry; its descendants are not inspected.
  • Symlinks (including broken links) are recorded but never followed. Special files are recorded as other; neither links nor special files add to size totals.
  • Sizes are logical bytes, not allocated disk usage. Hard-linked files count once per path. Folder sizes include descendants, so parent/child totals overlap.
  • The root is excluded from the folder count and shown as . in folder totals.
  • The folder timeline uses each directory's own modification timestamp and includes folders with no regular files. Directory timestamps reflect direct entry changes, not edits to existing files. The separate latest-file-change column is recursive; it ignores symlinks and is unavailable when no regular files were observed. Excluded or unreadable contents are not included. Old dates do not prove redundancy or imply that a folder is safe to delete.
  • Permission errors and disappearing files produce visible partial results. CLI exit codes: 0 complete, 1 fatal failure, 2 partial scan.
  • Scans read metadata only, not file contents. A scan is a best-effort snapshot, not an atomic filesystem snapshot; avoid actively changing the scanned tree.
  • Inventory data is kept in memory and embedded in HTML. Very large trees can produce large reports; exclude dependency/cache directories when appropriate.
  • Reports expose paths, sizes, and timestamps. Treat them as private when scanning sensitive directories.

Development

uv sync --extra streamlit
uv run pytest
uv run ruff check .
uv run mypy src/statsfolder
uv build

Metadata

Release files for statsfolder 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for statsfolder 0.1.6
File Size Uploaded Provenance Actions
statsfolder-0.1.6.tar.gz 17.5 kB Without provenance Details for statsfolder-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for statsfolder 0.1.6
File Interpreter ABI Platform Actions
statsfolder-0.1.6-py3-none-any.whl Python 3 none any Details for statsfolder-0.1.6-py3-none-any.whl

Total release size: 34.7 kB

Release files / statsfolder-0.1.6.tar.gz

Download URL statsfolder-0.1.6.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
27e98915d1d3988905adea56da0ed3368b3772a75a42b580d160e04d00aef6b2
BLAKE2b-256 checksum
How to use checksums
33f1f92bff0b23fbcb8180327a70f3d83a87fcc0738094a115ea4ef88ef6080b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Release files / statsfolder-0.1.6-py3-none-any.whl

Download URL statsfolder-0.1.6-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04742e58988446c7ad306437fcb8e925acce9737ada88f98de8b398566aa93a4
BLAKE2b-256 checksum
How to use checksums
1595689d074f40ee537ad19ff2672853a15f5dd46a2eb0894cd01cca0a3b625d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Security for statsfolder 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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