Skip to main content

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


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 hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page