--- id: django-watchfiles version: "1.4.0" license: MIT license_treatment: permissive maintenance: active --- # django-watchfiles — Make Django’s autoreloader more efficient by watching for changes with watchfiles. License: permissive · Maintenance: active · Downloads: 377.7K/mo ## 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 above — 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 pip install django-watchfiles uv add django-watchfiles poetry add django-watchfiles ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 377.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django autoreloader optimization, efficient file watching django, reduce cpu usage runserver, faster django development reload, watchfiles django integration, django file change detection, low latency django autoreload, django-development, file-watching, performance-optimization [View on SkillFed](https://skillfed.io/packages/django-watchfiles) · [View on PyPI](https://pypi.org/project/django-watchfiles/)