Skip to content

About

watch a file system for changes

Resources

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

listening_post_1379

lp1379

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.

License

MIT

Installation

Installable via pypi using pip:

pip install lp1379

or with uv:

uv pip install lp1379

The development version can be installed and used via pixi:

git clone git@github.com:WardDeb/listening_post_1379.git
pixi run python

Run the tests with:

pixi run test

About

watch a file system for changes

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages