py-trashguard
A safe, zero-dependency alternative to os.remove() that soft-deletes files to a .trash/ folder with simple restore and listing via CLI or Python API.

py-trashguard prevents accidental data loss by moving files to a .trash/ directory instead of permanently deleting them. Use it as a lightweight Python API (trash, restore, list_trash) or from the command line (--trash, --restore, --list). It’s dependency-free (pure standard library), OS-independent, and designed for developer workflows where a reversible delete is safer than os.remove(). Typical actions include soft-deleting files, restoring them later by name, and viewing current trash contents. The package includes a minimal, intuitive CLI and a clean module layout for easy embedding in scripts and tooling.
Python Package (pip)
Python Package (pip)
Python Package (pip)