An event system for file operations to execute commands for file events.
Project description
project-template
An event system for file operations to execute commands for file events.
Installation
pip install auto-file-flow
example
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 PatternHandler
handler = PatternHandler(
patterns={"*.txt": IOContainer(TextIO(), TextIO())},
pipelines={FileSystemEvent: [Pipeline([Operator(lambda data: print(data))])]}
)
watcher = Watcher(root="demo", handler=handler)
watcher.run()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
auto-file-flow-0.0.1.tar.gz
(10.0 kB
view details)
File details
Details for the file auto-file-flow-0.0.1.tar.gz
.
File metadata
- Download URL: auto-file-flow-0.0.1.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b5e366df5d1d67e9341c7897d66eec185c658e41fcdafda6194e5dfec29d6fd |
|
MD5 | 206949b6e53eb5972186a21c82e759b9 |
|
BLAKE2b-256 | 8ae51024310a48f3c7c8cf0ea14278737156fa106d1ba31362fb278975ed3d24 |