Skip to main content

A File System Watch dog

Project description

Watch Dog

author = Dr. Abiira Nathan

A File system watch dog. Fit for monitoring and reloading a server configuration file. Based on watchdog module

Installation

pip install wdog

Example Usage:

from wdog import WatchDog
import config

def reload_config():
    print("Reload server configiguration file")
    import importlib
    importlib.reload(config)
    # Assuming config reads reads settings from config.ini


dog = WatchDog(callback=reload_config, folder_to_track='.',
include_patterns=['*/config.ini'])
try:
    dog.monitor_forever()
except(KeyBoardInterrupt, EOFError):
    print('Bye!')

You can extend this to do some fancy things.

Project details


Download files

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

Files for wdog, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size wdog-1.0.1-py3-none-any.whl (9.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page