Skip to main content

The tool keeps you project envieronment clean by delete or archive files with specified extensions.

Project description

repler: report handler

The tool keeps you project envieronment clean by delete or archive files with specified extensions. Every time your script run, it produces logs, reports and other auxiliary files that relevant only for current execution. Also you may want to save some logs for the future compare\analysis. And obviously you will not think about to explode your hard with enormous bulk of old logs. The idea is to define clean (the cleaner) and archive (archivator) policy on folders. Running report handler at start of each test will clean unwanted files and archive desired files for future use.

The tool keeps you project environment clean by delete or archive files with specified extensions.

Installation:

pip install repler

Usage:

Create report handler with logging enable.

rh = ReportHandler(log_enable=True)

Apply clean policiy (still not execute) on project folder:

to delete all files with extentions txt and log.

an age of deleted files should be greter then 0.

rh.set_cleaner(folder_path="\working directory", age_before_del_hour=0, ext_to_del=["log","txt"])

Apply archive policiy (still not execute) on log folder:

to archive all files with extention log.

rh.set_archivator(sourse_folder="\working directory\Logs", archive_folder="\working directory\Logs\Archive", archive_prefix="MyTest", ext_to_arch=["log"], delete_archived_files=True)

Apply clean policiy (still not execute) on Archive folder:

to delete all archives older then 24 hours.

rh.set_cleaner(folder_path="\working directory\Logs\Archive", age_before_del_hour=24, ext_to_del=["zip"])

Prints all defined cleaners

rh.show_cleaner()

Prints all defined archivators

rh.show_archivator()

Run cleaning. Activate all defined cleaners.

rh.clean()

Run archivation, Activate all defined archives.

rh.archive()

Run both archive and clean. Activate all defined archives and cleaners.

rh.arcive_and_clean()

Enable report handler logging, if initially it was defined with out the log enable.

rh.set_log_on()

Project details


Download files

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

Source Distribution

repler-1.0.1.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

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

repler-1.0.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file repler-1.0.1.tar.gz.

File metadata

  • Download URL: repler-1.0.1.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for repler-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ff44f6c11a90815eb41879750527ca14db70db10e4aaf9b1a0ba7dfbe128905e
MD5 113dac296ddf964c98d7b2ed35c4e484
BLAKE2b-256 a2e95d946cbeb4849cd077ef502335896f70c0d53cecf939b4dec16de3cd560d

See more details on using hashes here.

File details

Details for the file repler-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: repler-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for repler-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d1c6f0f7533ea771c03989e195c4d3934792b03446301731e9a846f724a6d05f
MD5 bca00e681ec9b94d78bddbc2a57d6c4e
BLAKE2b-256 606e45100bbaf3d7c2513bba2c0024db360b4ab495607da9ebb29fce500f5040

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page