Watchfiles: Simple, modern and fast file watching for Python, written in Rust
10 months ago
- #python
- #file-watching
- #code-reload
- 简单、现代且高性能的Python文件监视与代码重载工具
- 文档详见watchfiles.helpmanual.io
- GitHub源码库:github.com/samuelcolvin/watchfiles
- 基于Rust的Notify库实现文件系统通知
- 曾用名'watchgod',提供迁移指南
- 要求Python 3.9 - 3.14版本
- 可通过pip安装:'pip install watchfiles'
- 提供Linux/MacOS/Windows预编译二进制文件,支持Rust稳定版源码安装
- 包含同步/异步文件监视的代码示例
- 内置'run_process'和'arun_process'函数用于运行及热重载代码
- 配备CLI工具,可在文件变更时自动执行命令