This repository mainly acts as a bridge between notify and python. Ultimate goal is a lightweight python importable function that watches a directory for changes.
from lp1379 import rswatcher
rswatcher("some/dir", print)rswatcher watches the directory recursively and blocks until interrupted (Ctrl-C).
The callback receives one dict per event:
{"kind": "modify", "paths": ["some/dir/file.txt"]}where kind is one of create, modify, remove, access or other.
A path that doesn't exist raises an OSError.
More example usage is available under the examples folder.
MIT
Installable via pypi using pip:
pip install lp1379or with uv:
uv pip install lp1379The development version can be installed and used via pixi:
git clone git@github.com:WardDeb/listening_post_1379.git
pixi run pythonRun the tests with:
pixi run test