watchfiles

 is a file watching and code reload in python, written in rust

Created: by Pradeep Gowda Updated: Apr 26, 2023 Tagged: python · rust · nix

Watchfiles is a file watching and code reload in python, written in rust.

Usage:

# pip install watchfiles
from watchfiles import watch

for changes in watch('./path/to/dir'):
    print(changes)

Also supports async via awatch:

import asyncio
from watchfiles import awatch

async def main():
    async for changes in awatch('/path/to/dir'):
        print(changes)

asyncio.run(main())