Skip to main content

awstorage

Every drive on every node, indexed, classified and diffed -- so you can see what you own before you delete it.

pip install git+https://github.com/Aitherium/awstorage.git
awstorage scan E:/ --depth 3 --catalog inventory.db
awstorage inventory --catalog inventory.db
awstorage propose --catalog inventory.db --snapshot 1
awstorage apply   --catalog inventory.db --proposal 3 --root E:/        # dry run
awstorage apply   --catalog inventory.db --proposal 3 --root E:/ --yes  # quarantine it
awstorage revert  E:/.awstorage-quarantine/3-20260901T230000            # changed your mind

Stdlib only. Works alone, offline, on the box whose disk is full.

What it does

  1. Scan a root into a snapshot: every directory tree to a bounded depth with its bytes, file count and newest mtime, plus the largest files. Bounded by a time budget; a scan that runs out marks the snapshot TRUNCATED instead of printing a total that looks complete and is not.
  2. Classify each tree: package-cache, build-temp, model-weights, container-store, dataset, backup, repo, logs, service-state, media, vm-disk, unknown -- and whether it is re-fetchable. Heuristics offline; plug any complete(prompt) -> str model callable into LLMClassifier and every verdict records whether a rule or a model made it, so a wrong call is auditable.
  3. Catalog snapshots in SQLite and diff them: what appeared, vanished, grew and shrank since last time. "What filled the disk?" becomes a query.
  4. Propose actions under a written policy. Rules pre-approve only re-fetchable classes past a size and an age; service-state, dataset, vm-disk, backup and unknown are never auto. Everything else is proposed for a human to approve.
  5. Apply -- dry run by default. A delete is a quarantine: the tree is renamed onto the same volume under <root>/.awstorage-quarantine/, revert puts it back byte-for-byte, and only quarantine --purge-older-than N --yes reclaims the bytes. apply refuses anything outside the declared roots, anything that changed since the scan, and anything neither pre-approved nor approved. Every outcome is ledgered.

Python

import awstorage
from pathlib import Path

snap = awstorage.classify_snapshot(awstorage.scan(Path("E:/"), max_depth=3))
cat = awstorage.Catalog("inventory.db")
sid = cat.put_snapshot(snap)
for row in awstorage.rank(snap)[:10]:
    print(row["exclusive_bytes"], row["cls"], row["refetchable"], row["path"])
props = awstorage.propose(snap, awstorage.default_policy(), snapshot_id=sid)
awstorage.apply(props[0], roots=[Path("E:/")], dry_run=True)

The three rules

  • Measure before you delete. A du answers one question once.
  • Re-fetchable is a property, not a guess. The classifier says why.
  • Deleting is a policy, not a mood. Dry run, roots, fingerprints, quarantine, ledger.

Composes with

  • awrecover -- backup_hook=lambda p: awrecover.snapshot(p, store, label) turns backup-then-delete into a restorable snapshot first.
  • awdk / awnode / awsh -- run the scanner where the disk is, post snapshots to a shared catalog, render proposals in a shell or a desktop panel.
  • awgraph -- awstorage graph emits nodes and typed edges (contains, duplicate_of) any graph store can ingest.

awstorage --self-test proves the refusals still refuse and the quarantine still reverts.

Apache-2.0.

Download files

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

Source Distribution

awstorage-0.1.0.tar.gz (56.2 kB view details)

Uploaded Source

Built Distribution

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

awstorage-0.1.0-py3-none-any.whl (52.2 kB view details)

Uploaded Python 3

File details

Details for the file awstorage-0.1.0.tar.gz.

File metadata

  • Download URL: awstorage-0.1.0.tar.gz
  • Upload date:
  • Size: 56.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for awstorage-0.1.0.tar.gz
Algorithm Hash digest
SHA256 62336cccfa2918fd85a30bfd19b243840d4d0119b410b71489563baf68721c4a
MD5 884146c9bcfbb0197943879330f4a25a
BLAKE2b-256 3bf578fb90eb4eac1311c67031aeb1be437012afc9b0434909d22de0a418b18c

See more details on using hashes here.

File details

Details for the file awstorage-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: awstorage-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 52.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for awstorage-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f28c912b3d22d5842a901f49efe9d844fb6260e185c25a3ed43d1f69a5848cbe
MD5 9a06b9e5e0dedb7e1d9c7419f6086de2
BLAKE2b-256 9562237bf54a6d3d7228ba9fdf0f4114d0ddde6216dd164b1becc83cac4d1a0d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

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