
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Simple, modern and high performance file watching and code reload in python.
Simple, modern and high performance file watching and code reload in python.
Documentation: watchfiles.helpmanual.io
Source Code: github.com/samuelcolvin/watchfiles
Underlying file system notifications are handled by the Notify rust library.
This package was previously named "watchgod", see the migration guide for more information.
watchfiles requires Python 3.8 - 3.13.
pip install watchfiles
Binaries are available for:
x86_64
, aarch64
, i686
, armv7l
, musl-x86_64
& musl-aarch64
x86_64
& arm64
amd64
& win32
Otherwise, you can install from source which requires Rust stable to be installed.
Here are some examples of what watchfiles can do:
watch
Usagefrom watchfiles import watch
for changes in watch('./path/to/dir'):
print(changes)
See watch
docs for more details.
awatch
Usageimport asyncio
from watchfiles import awatch
async def main():
async for changes in awatch('/path/to/dir'):
print(changes)
asyncio.run(main())
See awatch
docs for more details.
run_process
Usagefrom watchfiles import run_process
def foobar(a, b, c):
...
if __name__ == '__main__':
run_process('./path/to/dir', target=foobar, args=(1, 2, 3))
See run_process
docs for more details.
arun_process
Usageimport asyncio
from watchfiles import arun_process
def foobar(a, b, c):
...
async def main():
await arun_process('./path/to/dir', target=foobar, args=(1, 2, 3))
if __name__ == '__main__':
asyncio.run(main())
See arun_process
docs for more details.
watchfiles also comes with a CLI for running and reloading code. To run some command
when files in src
change:
watchfiles "some command" src
For more information, see the CLI docs.
Or run
watchfiles --help
FAQs
Simple, modern and high performance file watching and code reload in python.
We found that watchfiles demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.