Introduction
pyfsevents is a C extension providing a Python interface for Mac OS X 10.5 and later which allows monitoring for file system events, using FSEvents.
pyfsevents uses a callback mechanism: see Module Documentation.
Installation
python setup.py install
License
Distributed under the terms of the MIT License.
Requirements
Mac OS X >= 10.5 Leopard
Limitations
Thread-unsafe: CFRunLoop’s and Python threads do not quite interact well when put together :)
Module Documentation
pyfsevents uses a callback mechanism.
It provides two functions:
registerfd(fd, callback[, mask])
registerpath(path, callback)
to register objects to monitor.
After registration, listen() should be called to wait for events. The call is blocking: callbacks are fired on events.
stop() is available to stop the listen() call. stop() should be called from a different thread.
Please see examples/ for use cases of the extension.
callback signatures
The callback arguments passed to register* functions will be fired on events. These callback functions should be functions callable with two arguments, as listen will call these functions with two arguments:
For File descriptors, registerfd callbacks will be passed (fd, mask) arguments:
- fd
file descriptor which changed and fired the callback.
- mask
the POLLIN / POLLOUT mask, similar to the select.poll module.
For FSEvents, registerpath callbacks will be passed (path, recursive) arguments:
- path
the path where the event occurred.
- recursive
a boolean: if True, the caller should check recursively the directory tree for changes, and not only the specified directory.
Metadata
Release files for pyfsevents 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyfsevents-0.1.tar.gz | 12.0 kB | Without provenance | Details |
Release files / pyfsevents-0.1.tar.gz
| Download URL | pyfsevents-0.1.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62756435bb3e9951a19cafff31929623b09ba42937314ca98137bc3545289ead
|
|
BLAKE2b-256 checksum How to use checksums |
224b7f3005f807d7f9149b811f3d9ce88763a639dc39b25e9a5d5744767a4f21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyfsevents 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.