Watchfiles: Simple, modern and fast file watching for Python, written in Rust
10 months ago
- #python
- #file-watching
- #code-reload
- Simple, modern, and high-performance file watching and code reload in Python.
- Documentation available at watchfiles.helpmanual.io.
- Source code on GitHub: github.com/samuelcolvin/watchfiles.
- Uses the Notify Rust library for file system notifications.
- Previously named 'watchgod'; includes a migration guide.
- Requires Python 3.9 - 3.14.
- Install via pip: 'pip install watchfiles'.
- Binaries available for Linux, MacOS, and Windows; can also install from source with Rust stable.
- Examples provided for synchronous and asynchronous file watching.
- Includes 'run_process' and 'arun_process' for running and reloading code.
- Comes with a CLI for running commands when files change.