watchdog
Filesystem events monitoring
Install
watchdog on PyPI
pip
pip install watchdoguv
uv add watchdogpoetry
poetry add watchdogPackage facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 650 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: watchdog-6.0.0-cp310-cp310-macosx_10_9_universal2.whl; watchdog-6.0.0-cp310-cp310-macosx_10_9_x86_64.whl; watchdog-6.0.0-cp310-cp310-macosx_11_0_arm64.whl; watchdog-6.0.0-cp311-cp311-macosx_10_9_universal2.whl; watchdog-6.0.0-cp311-cp311-macosx_10_9_x86_64.whl; watchdog-6.0.0-cp311-cp311-macosx_11_0_arm64.whl; watchdog-6.0.0-cp312-cp312-macosx_10_13_universal2.whl; watchdog-6.0.0-cp312-cp312-macosx_10_13_x86_64.whl; watchdog-6.0.0-cp312-cp312-macosx_11_0_arm64.whl; watchdog-6.0.0-cp313-cp313-macosx_10_13_universal2.whl; watchdog-6.0.0-cp313-cp313-macosx_10_13_x86_64.whl; watchdog-6.0.0-cp313-cp313-macosx_11_0_arm64.whl; watchdog-6.0.0-cp39-cp39-macosx_10_9_universal2.whl; watchdog-6.0.0-cp39-cp39-macosx_10_9_x86_64.whl; watchdog-6.0.0-cp39-cp39-macosx_11_0_arm64.whl; watchdog-6.0.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl; watchdog-6.0.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl; watchdog-6.0.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl; watchdog-6.0.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl; watchdog-6.0.0-py3-none-manylinux2014_aarch64.whl
Keywords: python, filesystem, monitoring, monitor, FSEvents, kqueue, inotify, ReadDirectoryChangesW, polling, DirectorySnapshot
About watchdog
from the package's own PyPI description — quoted content, verbatim
Watchdog
|PyPI Version| |PyPI Status| |PyPI Python Versions| |GitHub Build Status| |GitHub License|
Python API and shell utilities to monitor file system events.
Works on 3.9+.
Example API Usage
A simple program that uses watchdog to monitor directories specified as command-line arguments and logs events generated:
.. code-block:: python
import time
from watchdog.events import FileSystemEvent, FileSystemEventHandler
from watchdog.observers import Observer
class MyEventHandler(FileSystemEventHandler):
def on_any_event(self, event: FileSystemEvent) -> None:
print(event)
event_handler = MyEventHandler()
observer = Observer()
observer.schedule(event_handler, ".", recursive=True)
observer.start()
try:
while True:
time.sleep(1)
finally:
observer.stop()
observer.join()
Shell Utilities
Watchdog comes with an optional utility script called watchmedo.
Please type watchmedo --help at the shell prompt to
know more about this tool.
Here is how you can log the current directory recursively
for events related only to *.py and...
Read as markdown · JSON record · Source repository · Homepage · Docs
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Watchdog monitors file system events across Linux, macOS, Windows, and BSD, providing a Python API and command-line utilities to detect and react to file and directory changes in real time.
Medium install friction: watchdog ships platform-specific compiled wheels for macOS (multiple architectures and Python versions 3.9–3.13) and manylinux2014 aarch64, but lacks wheels for Windows and other Linux variants, requiring compilation on those platforms. Maintenance is active with recent releases and strong community engagement (7396 GitHub stars).
Watchdog is licensed under Apache License 2.0, a permissive license that allows commercial and private use with minimal restrictions, requiring only attribution and a copy of the license.
Usage
from watchdog.events import FileSystemEventHandler
from watchdog.observers import Observer
import time
class MyEventHandler(FileSystemEventHandler):
def on_any_event(self, event):
print(event)
observer = Observer()
observer.schedule(MyEventHandler(), ".", recursive=True)
observer.start()
try:
while True:
time.sleep(1)
finally:
observer.stop()
observer.join()
Requires Python 3.9 or above. On macOS with kqueue, file descriptor limits may need adjustment (ulimit -n) for monitoring large directory trees. On some platforms, compiled extensions require build tools.
Verdict: Watchdog is a mature, actively maintained library (production/stable status, 7396 stars) with zero known vulnerabilities and permissive Apache 2.0 licensing. Medium install friction stems from platform-specific wheels; Windows and some Linux users will need compilation. Recommended for cross-platform file system monitoring in Python 3.9+.
Needs verification
- Whether pre-built wheels are available for Windows and all common Linux distributions, or if compilation is required on those platforms
- Performance characteristics and scalability limits when monitoring deeply nested directories or large file counts
Similar packages
permissive · top 1,000 on PyPI
supabase-authpermissive · top 1,000 on PyPI
identifypermissive · top 1,000 on PyPI
cloudpathlibpermissive · top 1,000 on PyPI
pathlib-abcpermissive · top 1,000 on PyPI
universal-pathlibpermissive · top 1,000 on PyPI
daffpermissive · top 1,000 on PyPI
tornadopermissive · top 1,000 on PyPI
html5libpermissive · top 1,000 on PyPI
pyeepermissive · top 1,000 on PyPI