django-watchfiles
Make Django’s autoreloader more efficient by watching for changes with watchfiles.
What it is and what it does
django-watchfiles is a Django app that swaps out the default file-change watcher (StatReloader) with a more efficient one powered by the watchfiles library. Instead of polling the filesystem every second, it uses the operating system's native file-notification APIs (inotify on Linux, FSEvents on macOS, etc.) to detect changes instantly. This dramatically reduces CPU usage—benchmarks show ~10% CPU every other second for StatReloader versus 0% for WatchfilesReloader on a medium-sized project—and cuts reload latency from over one second to as little as 50 milliseconds.
Installation is minimal: add the package to INSTALLED_APPS and it automatically becomes Django's reloader. It batches rapid successive changes (within 50ms windows, up to 1600ms total) to avoid redundant reloads when formatters or git operations touch multiple files at once. The package is production-stable, supports Python 3.9–3.14 and Django 4.2–6.0, and carries no known vulnerabilities.
Use it for:
- Speed up local Django development by cutting autoreload latency from 1+ seconds to ~50ms, enabling faster iteration cycles.
- Reduce laptop battery drain during development by eliminating the constant polling that StatReloader performs.
- Prevent missed or duplicate reloads when multiple files change in quick succession (e.g., after git branch switches or formatter runs).
- Replace Watchman or pyinotify without requiring external services or platform-specific dependencies.
- Maintain efficient file watching on modern Python versions (3.10+) where pywatchman support had stalled.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Replaces Django's default file-change watcher with watchfiles, a faster, lower-CPU alternative that uses OS-level file notifications instead of polling.
Yes. This is a drop-in replacement for Django's autoreloader with measurable performance and battery benefits, zero configuration overhead, and active maintenance. Install it if you run Django locally; the only gotcha is the WSL fallback to polling, which is still more efficient than the default. No security concerns, permissive license, and low install friction.
Install
django-watchfiles on PyPI
pip
pip install django-watchfilesuv
uv add django-watchfilespoetry
poetry add django-watchfilesInstalling django-watchfiles
Before you install
Low friction: pure Python wheel with only two runtime dependencies (django and watchfiles). Actively maintained with recent commits; last release 326 days ago indicates steady but not frantic updates.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal obligations.
Quickstart
pip install django-watchfiles
# Add to INSTALLED_APPS in settings.py:
INSTALLED_APPS = [
...,
"django_watchfiles",
]
# Then run:
python manage.py runserver
Requires Python 3.9+ and Django 4.2+. On Windows Subsystem for Linux (WSL), watchfiles falls back to polling but remains more efficient than Django's default StatReloader.
Verify before relying
- Whether the 50ms detection latency and 1600ms batching window are configurable per-project or only via environment variables.
- Behavior and performance characteristics on platforms other than macOS, Linux, and WSL.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — django, watchfiles |
| Maintenance | actively maintained — 326 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 377,664/month — #7,121 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_watchfiles-1.4.0-py3-none-any.whl
Keywords: Django
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
pywatchmanpywatchman is a Python client for Watchman, a…
permissive · top 15,000 on PyPI
watchfilesWatches file system changes and triggers…
permissive · top 1,000 on PyPI
django-browser-reloadAutomatically reloads your browser when you…
permissive · top 15,000 on PyPI
watchgodWatches a directory for file changes and…
permissive · top 15,000 on PyPI
django-watchmandjango-watchman exposes a status endpoint that…
permissive · top 15,000 on PyPI
httpwatcherhttpwatcher is a simple HTTP server and library…
permissive · top 15,000 on PyPI
pyinotifyMonitors Linux filesystem events (file…
permissive · top 5,000 on PyPI
pytest-watcherAutomatically reruns pytest (or another test…
permissive · top 5,000 on PyPI
livereloadAutomatically reloads webpages in your browser…
permissive · top 15,000 on PyPI
sphinx-autobuildWatches Sphinx documentation source files for…
permissive · top 5,000 on PyPI