Metadata-Version: 2.4
Name: fsnotify-python
Version: 0.0.2
Summary: Recursive normalized Linux inotify events with sync and asyncio APIs
Author-email: Veya Fürst <ghgstefan@gmail.com>
License-Expression: MIT
Project-URL: Repository, https://github.com/0xveya/inotify-recursive
Keywords: inotify,filesystem,watcher,asyncio,linux
Classifier: Development Status :: 3 - Alpha
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typed-errs<1,>=0
Dynamic: license-file

# fsnotify-python

Recursive, normalized Linux filesystem events with synchronous and `asyncio`
frontends. It talks directly to libc's inotify API and adds watches when new
directories appear.

```bash
uv add fsnotify-python
```

## Synchronous example

```python
from inotify_recursive import Ok, Watcher

opened = Watcher.open("./data")
if isinstance(opened, Ok):
    with opened.value as watcher:
        for event in watcher:
            print(event)
```

Use `AsyncWatcher.open(...)` for async iteration. Events are normalized to
`CREATED`, `MODIFIED`, `DELETED`, `RENAMED`, and `METADATA_CHANGED`.

## Where I use it

This is my internal filesystem-watching library for 42 projects. It was
extracted from `coding/42/cc/rag-against-the-machine`, where the synchronous
watcher feeds incremental indexing and the async watcher feeds the long-running
FastAPI/RAG service. The standalone package keeps the recursive inotify
registration, rename coordination, normalized events, and sync/async APIs.

## Dependencies

- Linux with inotify and Python 3.10+
- `typed-errs` for exception-free public results
- No external watcher dependency

## Development and release

Run `mise run check`. Every push to `master` publishes a unique `0.0.<CI run>` ZeroVer
version through PyPI Trusted Publishing. `mise run publish` remains available.
