https://github.com/shahaf-f-s/file-flow
An event system for file operations to execute commands for file events.
https://github.com/shahaf-f-s/file-flow
file-automation file-events file-watcher filesystem
Last synced: 4 months ago
JSON representation
An event system for file operations to execute commands for file events.
- Host: GitHub
- URL: https://github.com/shahaf-f-s/file-flow
- Owner: Shahaf-F-S
- Created: 2023-08-27T21:15:37.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-21T07:25:15.000Z (over 1 year ago)
- Last Synced: 2025-05-28T13:50:09.971Z (4 months ago)
- Topics: file-automation, file-events, file-watcher, filesystem
- Language: Python
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# project-template
> An event system for file operations to execute commands for file events.
## Installation
```
pip install auto-file-flow
```## example
```python
from file_flow.events import FileSystemEvent
from file_flow.io import TextIO, IOContainer
from file_flow.pipeline import Pipeline
from file_flow.operation import Operator
from file_flow.watcher import Watcher
from file_flow.handler import PatternHandlerhandler = PatternHandler(
patterns={"*.txt": IOContainer(TextIO(), TextIO())},
pipelines={FileSystemEvent: [Pipeline([Operator(lambda data: print(data))])]}
)watcher = Watcher(root="demo", handler=handler)
watcher.run()
```