Skip to main content

1. Environment

  • Python 3.14.7
  • pip 26.2.1

2. Installation

$ pipx install spreen-clean

(pip install spreen-clean works too if you prefer managing the environment yourself.)

For development, install the dependencies via requirements.txt:

$ pip install -r requirements.txt

3. Execution

$ file-clean '*.log' --dirname ./tmp
Target dirname is /home/hayat01sh1da/workspace/tmp
========== [DRY RUN] Total File Count to Clean: 2 ==========
========== [DRY RUN] Start Cleaning *.log ==========
========== [DRY RUN] Cleaning ./tmp/app.log ==========
========== [DRY RUN] Cleaning ./tmp/jobs/worker.log ==========
========== [DRY RUN] Cleaned *.log ==========
========== [DRY RUN] Total Cleaned File Count: 2 ==========

The dry run above is the default. Once the list looks right, execute the deletion with --mode e (this cannot be undone):

$ file-clean '*.log' --dirname ./tmp --mode e
Target dirname is /home/hayat01sh1da/workspace/tmp
========== [EXECUTION] Total File Count to Clean: 2 ==========
========== [EXECUTION] Start Cleaning *.log ==========
========== [EXECUTION] Cleaning ./tmp/app.log ==========
========== [EXECUTION] Cleaning ./tmp/jobs/worker.log ==========
========== [EXECUTION] Cleaned *.log ==========
========== [EXECUTION] Total Cleaned File Count: 2 ==========

With no arguments, file-clean dry-runs every file under the current directory (PATTERN defaults to *, --dirname to .).

Two guardrails back the dry-run default: a dirname resolving to a filesystem root (/, C:\, ...) is refused before anything is scanned, and when the execution mode matches more than 100 files the CLI asks for an explicit y first — pass --yes to skip the prompt in scripts:

$ file-clean '*.log' --dirname ./tmp --mode e
About to delete 101 files (more than 100). Type `y` to proceed: n
Aborted the execution mode without deleting anything.

As a library:

from spreen_clean import Application

Application.run(dirname='./tmp', pattern='*.log')            # dry run
Application.run(dirname='./tmp', pattern='*.log', mode='e')  # execute

# The progress log goes to stdout by default; pass any text stream to capture it.
import io
stream = io.StringIO()
Application.run(dirname='./tmp', pattern='*.log', io=stream)
stream.getvalue()  # => 'Target dirname is ...\n========== [DRY RUN] ...'

4. Unit Test

$ pytest
============================= test session starts ==============================
platform linux -- Python 3.14.7, pytest-9.1.1, pluggy-1.6.0
rootdir: spreen-clean/PyPI
configfile: pyproject.toml
collected 17 items

test/test_application.py ........                                        [ 47%]
test/test_cli.py .........                                               [100%]

============================== 17 passed in 0.42s ===============================

5. Static Code Analysis

$ flake8 .
$ autoflake8 --in-place --remove-duplicate-keys --remove-unused-variables --recursive .
$ autopep8 --in-place --aggressive --aggressive --recursive .

6. Type Checks

$ mypy .
Success: no issues found in 6 source files

7. Build

$ python -m build
$ pipx install ./dist/spreen_clean-0.1.0-py3-none-any.whl

Release files for spreen-clean 0.1.2

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

Source distribution (sdist)

Source distribution for spreen-clean 0.1.2
File Size Uploaded
spreen_clean-0.1.2.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spreen-clean 0.1.2
File Interpreter ABI Platform
spreen_clean-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 13.8 kB

Release files / spreen_clean-0.1.2.tar.gz

Download URL spreen_clean-0.1.2.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8878267e87bb750e308eaf5a5866c0c10f6ce78b4ae21ab377dd5906867ea678
BLAKE2b-256 checksum
How to use checksums
b627af3baa7ffde3af27ba0950a5955c97357a36502286630c9d252cdf8f52c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release files / spreen_clean-0.1.2-py3-none-any.whl

Download URL spreen_clean-0.1.2-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10547befb5dac2b7164d5b8d0a0035b4c8ec9b1722dc579c0170ed199693ebd1
BLAKE2b-256 checksum
How to use checksums
978b057241d79f91cb677fa84561bace21de722f9bff4a4b68a9e2fb307771f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release 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