from pathlib import Path from watchfiles import watch from devtools import debug THIS_DIR = Path(__file__).parent for changes in watch(THIS_DIR, debug=True): debug(changes)