inotify-simple
A simple wrapper around inotify. No fancy bells and whistles, just a literal wrapper with ctypes. Under 100 lines of code!
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 on this page — 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
inotify-simple on PyPI
pip
pip install inotify-simpleuv
uv add inotify-simplepoetry
poetry add inotify-simpleInstalling 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 the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 354 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,802,132/month — #3,541 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: inotify_simple-2.0.1-py3-none-any.whl
Keywords: inotify
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
asyncinotifyProvides async and sync Python bindings to…
copyleft · top 15,000 on PyPI
inotifyWraps Linux kernel inotify to watch directories…
copyleft · top 15,000 on PyPI
watchdogWatchdog monitors file system events across…
permissive · top 1,000 on PyPI
pyinotifyMonitors Linux filesystem events (file…
permissive · top 5,000 on PyPI
pywatchmanpywatchman is a Python client for Watchman, a…
permissive · top 15,000 on PyPI
tailerTailer provides functions to read lines from…
permissive · top 15,000 on PyPI
pyseccomppyseccomp provides a pure-Python interface to…
permissive · top 5,000 on PyPI
pyprctlProvides a pure-Python interface to Linux's…
permissive · top 15,000 on PyPI
ftputilftputil provides a high-level FTP client…
permissive · top 15,000 on PyPI
libmagicProvides Python bindings to the libmagic…
copyleft · top 15,000 on PyPI