watchfiles
A simple, modern, and high-performance file watching and code reloading library for Python, currently at version 1.1.1, with a release cadence of approximately every 3-4 months.
Warnings
- breaking The package was previously named 'watchgod'.
- deprecated Python 3.8 support was dropped in version 0.24.0.
- gotcha Ensure that the 'notify' Rust library is installed for optimal performance.
Install
-
pip install watchfiles
Imports
- watch
from watchfiles import watch
- awatch
from watchfiles import awatch
- run_process
from watchfiles import run_process
- arun_process
from watchfiles import arun_process
Quickstart
from watchfiles import watch
for changes in watch('./path/to/dir'):
print(changes)