# watchdog

> Python API and shell utilities to monitor filesystem events

Source: https://talira.ai/catalog/watchdog-28w8r1se
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library, Command-line tool
- Categories: [libraries / filesystem](https://talira.ai/categories/libraries/filesystem), [languages / python](https://talira.ai/categories/languages/python)
- Licence: Apache-2.0[^1][^2]
- Pricing: Free and open source[^2]
- Pricing notes: Free and open source (Apache-2.0).
- Free tier: yes[^2]
- Backed by: [Mickaël Schoentgen](https://talira.ai/orgs/mickael-schoentgen.md)

watchdog is a Python library for monitoring filesystem events, with an optional `watchmedo` command that logs changes or runs a shell command when files change. It uses inotify on Linux, FSEvents or kqueue on macOS, kqueue on the BSDs and ReadDirectoryChangesW on Windows, and can fall back to polling directory snapshots. `watchmedo` can also run tricks from a `tricks.yaml` file.

## Links

- GitHub: https://github.com/gorakhargosh/watchdog
- Docs: https://python-watchdog.readthedocs.io/en/latest/

## Problems it solves

- run a function in my Python script whenever a file in a folder changes
- rerun a shell command automatically when I save a file
- watch a directory for new files in Python on Linux, macOS and Windows

## Features

- inotify, FSEvents, kqueue and ReadDirectoryChangesW observers
- polling observer for any OS and for network shares
- watchmedo command to log changes or run a shell command
- tricks.yaml files for watchmedo
- builds and runs under free-threaded CPython

## Limitations

- With kqueue, the open file limit must be raised above the number of files watched, and it doesn't scale to large deeply nested trees[^1]
- Its thread safety under free-threaded CPython hasn't been fully audited, notably the macOS FSEvents interface[^1]

## Trust

Overall: 0.69 out of 1.
Signals: maintenance 1.00, adoption 0.77, momentum 0.48, community 0.93, backing 0.30, extensibility 0.00.

- last commit 2 days ago
- 228 commits in the last 90 days
- latest release v7.1.1 8 days ago
- 7.5k GitHub stars
- 216 contributors
- accepts sponsorship (Github, Thanks Dev)
- backed by Mickaël Schoentgen

## Sources

[^1]: https://github.com/gorakhargosh/watchdog/blob/master/README.rst (checked 29 Nov 2026)
[^2]: https://github.com/gorakhargosh/watchdog/blob/master/LICENSE (checked 29 Nov 2026)
