Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Build Status

A simple script that monitors changes in the file system using polling. Useful for small, platform independent projects that don’t need complex libraries like great watchdog.

Facts or why you should take a good look at watchers.py:

  • No dependencies, only Python 3.2, 3.3 or 3.4

  • Supports Windows and Unix

  • Only one file, less than 12 KB

  • Simple and minimalistic

Example

A simple program that uses watchers.py to monitor specified directory in 2 seconds interval. It prints the message on a change in a file system.

from watchers import SimpleWatcher

def foo():
    print('Something has changed in directory!')
x = SimpleWatcher(2, 'path/to/dir', foo)
x.start()

More examples available at Github.

Why polling? WHY?!

Because it works everywhere and has no other dependencies than pure Python.

Installation

Install from PyPI using pip

pip install watchers.py

Or download a file watchers.py and use it in your project directly.

Performance

System:

Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz
Debian Linux 3.13-1-686 on USB flash drive

Checking 8000 files in 2000 directories took:

                Total:    Checking one file:
Watcher:        463 ms    0.058 ms
SimpleWatcher:  379 ms    0.047 ms

Release files for watchers.py 1.0.1-rc.1

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

Source distribution (sdist)

Source distribution for watchers.py 1.0.1-rc.1
File Size Uploaded
watchers.py-1.0.1-rc.1.tar.gz 4.8 kB Details

Release files / watchers.py-1.0.1-rc.1.tar.gz

Download URL watchers.py-1.0.1-rc.1.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f699621c7fd3cd9598dc359d47e4b1f2c0b0175d48703e2eec63c984d51fad39
BLAKE2b-256 checksum
How to use checksums
417d93d4dc5d47aade6b58ad55d0cffb9110b7f950730f2049db7513f9f67ea2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.1-rc.1 This release

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