Watchdog: Python filesystem event triggers - Advent of Code Python Libraries 2021

Published: 11 December 2021
on channel: InvalidEntry
2,369
60

This library braces on the edge of being a framework, but it allows you to trigger a block of code when a file changes, and does it efficiently - cross-platform, it hooks into the OS to monitor a file or a folder, and then fires events at a registered object when something changes.

Basically, How to detect a file changing on the OS, in python.

What's nice about this is that by hooking into the OS it's highly performant - not only is it nearly completely dormant when there are no changes, it's incredibly fast to react when there is.

This is one of those libraries to be aware of and have in your arsenal to pull out when you need it - the only challenge here is if you're using any other framework, is how to get it to tie in nicely - but often this is solvable with a bit of thinking.


On this page of the site you can watch the video online Watchdog: Python filesystem event triggers - Advent of Code Python Libraries 2021 with a duration of hours minute second in good quality, which was uploaded by the user InvalidEntry 11 December 2021, share the link with friends and acquaintances, this video has already been watched 2,369 times on youtube and it was liked by 60 viewers. Enjoy your viewing!