Skip to main content

Simple Python framework for performing file polling.

It polls for files in the specified input directory and moves them to the output directory. Methods for checking the files (e.g., whether an image is valid) and processing them can be supplied to the poller instance. Optionally, the input files can be deleted rather than moved.

For more information and examples see:

https://github.com/waikato-datamining/simple-file-poller

Changelog

0.0.13 (2025-01-14)

  • added stop file support, i.e., when this file appears the poller will stop polling

0.0.12 (2025-01-07)

  • switched to underscores in project name

  • added support for batch processing of files

0.0.11 (2024-09-13)

  • using shutil.move instead of os.rename to work across file-system boundaries

0.0.10 (2021-03-18)

  • added the output_num_files boolean property to the Poller class, which extends the logging output by outputting a x/y string as well (x=current file index, y=total number of files in a batch)

0.0.9 (2021-01-05)

  • the Poller.logging property no longer returns the check_file method

0.0.8 (2020-12-11)

  • fixed high CPU usage (ie constant polling) when using unlimited files to list (max_files=0)

  • poll_wait and watchdog_check_interval are now float instead of int to allow for sub-second poll waits

  • internal delays when poller is busy have been dropped from 1s to 0.1s

0.0.7 (2020-12-10)

  • keyboard_interrupt method is now public

0.0.6 (2020-12-10)

  • fixed race condition between watchdog reacting to new files and watchdog checking for files at specific intervals

  • logging now distinguishes between DEBUG/INFO/ERROR levels

  • keyboard interrupts via CTRL+C are now handled correctly

  • in watchdog mode, an initial scan of the input directory is now performed, in case files were already present

0.0.5 (2020-12-10)

  • added params object to allow attaching of arbitrary parameters to be used by the check_file and process_file methods; this avoids accidentally overriding Poller attributes that were introduced in later versions.

0.0.4 (2020-12-10)

  • added support for using watchdog for reacting to file creation events, speeding up polling

0.0.3 (2020-12-04)

  • poll method now skips directories, which could be listed if no extensions are supplied to restrict the polling.

0.0.2 (2020-12-03)

  • added other_input_files glob list and delete_other_input_files to manage additional files that may reside in the input directory along side the actual files that are being processed.

0.0.1 (2020-12-02)

  • initial release

Metadata

Release files for simple-file-poller 0.0.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simple-file-poller 0.0.13
File Size Uploaded
simple_file_poller-0.0.13.tar.gz 12.9 kB Details

Release files / simple_file_poller-0.0.13.tar.gz

Download URL simple_file_poller-0.0.13.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8026480c98ebe32d85211c13838fb18d9a1fe1033ea358e41de54a79c51e6af1
BLAKE2b-256 checksum
How to use checksums
ad2bd652da2d37bd62fbaecf33c138ddb219447904ad7a1d3b71e7e87d4a59cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.13 This release

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page