--- id: inotify-simple version: "2.0.1" license: BSD-2-Clause license_treatment: permissive maintenance: aging --- # inotify-simple — A simple wrapper around inotify. No fancy bells and whistles, just a literal wrapper with ctypes. Under 100 lines of code! License: permissive · Maintenance: aging · Downloads: 1.8M/mo ## What it is and what it does inotify-simple is a minimal, pure-Python wrapper around the Linux inotify system call. It exposes inotify's core functionality—initializing a watch, adding/removing watched paths, and reading file system events—through a file-like object and namedtuple event objects, without adding abstraction layers or convenience features. The implementation uses ctypes to call the underlying C library, keeping the code under 100 lines and avoiding compiled dependencies. You use it to monitor directories and files for changes (creation, deletion, modification, etc.) on Linux systems. It is designed for developers who want direct, low-level access to inotify semantics rather than a high-level abstraction; you manage watch descriptors yourself and interpret event masks using the provided flags enum. Use it for: - Monitor a directory for new files and trigger processing when they appear. - Track modifications to configuration files and reload application state on change. - Build a file watcher tool that reports file system events in real-time. - Implement cleanup logic when watched directories or files are deleted. - Debug file system activity by logging all events on a watched path. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A lightweight Python wrapper around the Linux inotify API for monitoring file system events, implemented in pure Python with ctypes and minimal code. Yes, if you need file system event monitoring on Linux and prefer a minimal, dependency-free solution. The pure-Python implementation and explicit design philosophy for long-term stability make it reliable for straightforward use cases. Not suitable for Windows or macOS, and the aging maintenance status is normal by design—choose it when you want simplicity over active feature development. ## Install pip install inotify-simple uv add inotify-simple poetry add inotify-simple ## Installing inotify-simple Before you install: Low friction: pure Python wheel with no runtime dependencies. Maintenance status is aging—last release 354 days ago—but the project explicitly states it requires minimal maintenance by design and the repository remains active. License in practice: BSD-2-Clause is permissive; you may use, modify, and distribute this package freely in commercial or private projects with minimal restrictions. Quickstart: from inotify_simple import INotify, flags inotify = INotify() wd = inotify.add_watch('/tmp/test', flags.CREATE | flags.MODIFY) for event in inotify.read(): print(event) Linux only; inotify is not available on Windows or macOS. Requires Python 3.6 or higher. Verify before relying: - Whether the ctypes wrapper fully covers all inotify features or only a subset of the C API. - Performance characteristics under high-frequency file system event loads compared to alternatives. ## Package facts - License: BSD-2-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 1.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags file system event monitoring, inotify wrapper python, linux file change detection, directory watch events, file modification tracking, ctypes inotify binding, file-monitoring, linux-only [View on SkillFed](https://skillfed.io/packages/inotify-simple) · [View on PyPI](https://pypi.org/project/inotify-simple/)