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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
wdog-1.0.1-py3-none-any.whl
(9.8 kB
view details)
File details
Details for the file wdog-1.0.1-py3-none-any.whl.
File metadata
- Download URL: wdog-1.0.1-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.19.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba44e1a7b5524bfd73ae775f77df93eb0424d3e8e59989cadd50e4d71c2548fb
|
|
| MD5 |
58f9478a17d12590e3ae9b7a0a20be50
|
|
| BLAKE2b-256 |
69f3b715bdfb598fcf24e2e239f4e7e52d5ed0a2bd392490561d57469a937526
|