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-hiddenis specified. - Only files and folders owned by the current user are scanned (on Windows, system-attribute entries, the Windows folder and other users' profiles are skipped); pass
-a/--allto include system and other users' entries. --excludeis 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.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| statsfolder-0.1.8.tar.gz | 21.4 kB | Without provenance | Details for statsfolder-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| statsfolder-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for statsfolder-0.1.8-py3-none-any.whl |
Total release size: 42.1 kB
Release files / statsfolder-0.1.8.tar.gz
| Download URL | statsfolder-0.1.8.tar.gz |
|---|---|
| Size | 21.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
552b76268dafb3ee6a3e034a484e662f929d1a1456834711c09730205cfa34d7
|
|
BLAKE2b-256 checksum How to use checksums |
58dc97b93f357df933f0f01a42f2da5f62da6d84364c8d86cf430a7968016b0b
|
| 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.8-py3-none-any.whl
| Download URL | statsfolder-0.1.8-py3-none-any.whl |
|---|---|
| Size | 20.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
abe1e81285eae8b9db3959a5b66fe49e62799aab6d85b2feea4c51a27b133e8e
|
|
BLAKE2b-256 checksum How to use checksums |
926d2bfb09501f6be7e74eb6da21980e7cfffaba23869547f4046b24a4778360
|
| 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.8
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.