Skip to main content

File system watchdog wrapper. Monitors a directory and logs events.

Project description

fs-watchdog

File system Watchdog wrapper (CLI).

Install

From PyPI:

pip install fs-watchdog

(Recommended for CLI tools)

pipx install fs-watchdog

Usage

fs-watchdog <DIRECTORY_PATH>

Examples:

Windows:

fs-watchdog "C:\Users\User\Documents"

macOS / Linux:

fs-watchdog /Users/user/Documents

You can also run as a module:

python -m file_watchdog <DIRECTORY_PATH>

Output

  • Events are logged to the console in the following format:

    [HEX_TIMESTAMP] event_type: path/to/file
    
  • Events are also saved to a log file named watchdog_events_<timestamp>.log.

  • The log file is created in the current working directory.

  • Log file entries use ISO timestamp format (UTC, Z suffix):

    [2024-04-02T12:34:56.789012Z] event_type: path/to/file
    

Finishing up

Press Ctrl+C to stop monitoring.

See also

My other small but snappy Python tools and automation,

  • github-stargazers – Python 3.13 – Github Stargazer Scraper.
  • img2pdf_helper – Simplify img2pdf configuration and usage.
  • fs-watchdog – Python 3.14 – file system Watchdog wrapper.

Tim Abdiukov

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

fs_watchdog-0.1.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fs_watchdog-0.1.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file fs_watchdog-0.1.0.tar.gz.

File metadata

  • Download URL: fs_watchdog-0.1.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for fs_watchdog-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9acdfe59e0467daba85812589bec0022068f547d24a744eb0b95f93d1678b0ef
MD5 65e0cbef37f84fc81e0bf286ea1a8592
BLAKE2b-256 e6d20ea68ed297602439fa4a5f48dfd378d17e66b9c7792a66528e3738b0a687

See more details on using hashes here.

File details

Details for the file fs_watchdog-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fs_watchdog-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for fs_watchdog-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 483b6c709cc371e98b7487df3616a3a68e38500c07cf939eba9a13209342bd31
MD5 7da84ef68e5e333074628afa66bba339
BLAKE2b-256 de28705f4c4e8a4d62d75f40e3dcbb716076a8a5e99940cdbdf3cdd35a9ff030

See more details on using hashes here.

Supported by

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