Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Python
  3. watchfiles

watchfiles

MITPythonv1.2.0

A high-performance file watching and code reload library for Python, built with Rust for speed and reliability.

Visit WebsiteGitHubGitHub
2.5k stars141 forks0 contributors

What is watchfiles?

Watchfiles is a Python library for monitoring file system changes and automatically reloading code during development. It provides high-performance file watching capabilities using Rust under the hood, eliminating the need for manual restarts when source files are modified.

Target Audience

Python developers who need efficient file watching for development tools, auto-reload servers, or build automation scripts.

Value Proposition

Developers choose Watchfiles for its speed, simplicity, and cross-platform reliability, offering both sync and async APIs with built-in code reloading functions out of the box.

Overview

Simple, modern and fast file watching and code reload for Python, written in Rust

Use Cases

Best For

  • Auto-reloading Python web servers during development
  • Building development tools that react to file changes
  • Creating hot-reload functionality for applications
  • Monitoring directories for changes in automation scripts
  • Improving developer workflow with automatic code execution
  • Watching configuration files for dynamic updates

Not Ideal For

  • Projects that only need simple, polling-based file watching without performance concerns, where lightweight pure-Python libraries suffice.
  • Environments where Rust toolchain installation is prohibited or pre-built binaries are unavailable, such as air-gapped or custom-built systems.
  • Applications requiring real-time monitoring of non-file system events like database changes, network requests, or process states.

Pros & Cons

Pros

Rust-Powered Performance

Leverages the Rust `notify` library for efficient, low-level file system notifications, ensuring faster and more reliable event detection compared to pure Python solutions.

Dual Sync/Async APIs

Provides both synchronous `watch` and asynchronous `awatch` functions, allowing seamless integration into any Python application architecture without forcing async adoption.

Built-in Code Reloading

Includes `run_process` and `arun_process` to automatically restart Python processes on file changes, simplifying development workflows and reducing manual intervention.

Cross-Platform Binaries

Offers pre-built binaries for most architectures on Linux, macOS, and Windows, minimizing installation barriers and ensuring consistent performance across platforms.

Cons

Rust Compilation Barrier

Installing from source requires Rust stable, which can be a significant hurdle for teams without Rust expertise or in environments with restricted toolchains.

Limited Event Scope

Focused solely on file system events, so projects needing to monitor other sources like APIs or databases require additional tooling or custom implementations.

Python Version Constraints

Supports only Python 3.9 to 3.14, excluding older versions that legacy projects might depend on, potentially forcing upgrades or alternative solutions.

Frequently Asked Questions

Quick Stats

Stars2,519
Forks141
Contributors0
Open Issues40
Last commit1 month ago
CreatedSince 2017

Tags

#uvicorn#filesystem#asyncio#file-watching#async#python#cli#development-tools#hot-reload#notify#inotify#rust

Built With

R
Rust
P
Python

Links & Resources

Website

Included in

Python290.8k
Auto-fetched 14 hours ago

Related Projects

watchdogwatchdog

Python library and shell utilities to monitor filesystem events.

Stars7,385
Forks759
Last commit4 days ago
python-magicpython-magic

A python wrapper for libmagic

Stars2,914
Forks304
Last commit4 days ago
pathlibpathlib

(Python standard library) A cross-platform, object-oriented path library

Stars0
Forks0
Last commit
mimetypesmimetypes

(Python standard library) Map filenames to MIME types

Stars0
Forks0
Last commit
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub