Simple, modern and high performance file watching and code reload in python.
Project description
watchfiles
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.
Installation
watchfiles requires Python 3.7 - 3.10.
pip install watchfiles
Binaries are available for:
- Linux:
manylinux-x86_64
,musllinux-x86_64
&manylinux-i686
- MacOS:
x86_64
&arm64
(except python 3.7) - Windows:
amd64
&win32
Otherwise, you can install from source which requires Rust stable to be installed.
Usage
Here are some examples of what watchfiles can do:
watch
Usage
from watchfiles import watch
for changes in watch('./path/to/dir'):
print(changes)
See watch
docs for more details.
awatch
Usage
import 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
Usage
from 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
Usage
import 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.
CLI
watchfiles also comes with a CLI for running and reloading code.
For more information, see the CLI docs.
Or run
watchfiles --help
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for watchfiles-0.13-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4995664f7ac269397e3f28fae177c2d2688379e68cc93d99fdcf1bb0a75a7da |
|
MD5 | 33dbe2de6cd11430257bcc207d16b81d |
|
BLAKE2b-256 | d5420a47659ecc9c3f18f0794403c9eefa6085ea7d25e9918dc40ebde8426d3d |
Hashes for watchfiles-0.13-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77ddb776640be101201602e2fe81dde206458c25ede4cf174260dc9594d50da6 |
|
MD5 | d505600a212d0c7230205a09a2bc6d38 |
|
BLAKE2b-256 | 3cd11d61813aa9bf0e593d0eb5223f5fd6f316700a0598f270c9a0200cc0fdf6 |
Hashes for watchfiles-0.13-cp310-cp310-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d62df849ff9e2c283408c168d4966cd4d0b395194a5170078c1abff16e9fb6b6 |
|
MD5 | 731b66f57bcdf099c41db35f0522fcea |
|
BLAKE2b-256 | 0545681e179f393c9dbf0d51435265702fe04cc66347677035f932d3c34cbd8b |
Hashes for watchfiles-0.13-cp310-cp310-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27db8d3106267ab69de793dafe22ae551a8a3827f409430a9690b633ff718aa7 |
|
MD5 | 35240f66fd5ce5cce394780c99aff736 |
|
BLAKE2b-256 | 55dbcb0e658b6a40d1c35cccc6077b74fa8c4b0ba1240a3153ae1ee979474cf1 |
Hashes for watchfiles-0.13-cp310-cp310-manylinux_2_24_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cde46ddec1a182f74cb73eb6e6e9c92e3236567b89e5a93c415f19237e521b26 |
|
MD5 | a27db491b58d98bf1e45930b588e7e88 |
|
BLAKE2b-256 | b0c7cc20e82f683d613c01f164c6648f9d77f6754b34d51b0371d85e605d75c4 |
Hashes for watchfiles-0.13-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23edc0e0a90337160e7b3cb96a2ea62d3a514ceb73c7ad9df535a161e2d7e9aa |
|
MD5 | beea70813bcf17d5ff569e94a5f74f94 |
|
BLAKE2b-256 | 0c67792726fef548ac2ceba20f0ecc76d7a2cb1f0abaada63bb0e06470c5134e |
Hashes for watchfiles-0.13-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf145540fcc196da0af5e2eb58415f0dd64d73e2390e8b691ee5c9128094d58f |
|
MD5 | c7219a39a8930749db916c86b0c5ef1e |
|
BLAKE2b-256 | bedea1c942b48eca1033765e65639a76f6ff99dd3244762e3d31ad1ffb143760 |
Hashes for watchfiles-0.13-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed060f861e8e89edd1c4c67b6074579f75f4c0e84b6d84696b503a8d4fd18741 |
|
MD5 | 49787ce77e6409a4a6b84d894ee130ec |
|
BLAKE2b-256 | 0b733615b95fc4e7de4775b4499dd5578287f69070585ba9840eb61fb72b4e76 |
Hashes for watchfiles-0.13-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2056a3b53154a5cd8e1502dbfb024afd6ff1512d10fb667eec90483b01e8b384 |
|
MD5 | 72b76f46894016055e17e0e1960568e6 |
|
BLAKE2b-256 | a4efcacedd77d2131d2d69789c0bda862aef7fc7a80bfdeee7c342eb99df748e |
Hashes for watchfiles-0.13-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2689146477a913447ea236c552900d75fd37a35f7cb87f757eded06b2b444bd |
|
MD5 | b96a3d009626a138c791e4d485606c65 |
|
BLAKE2b-256 | 6e4e504e25de2fc46abf75cee030d8296d9f3e792dbde9770110ad968110741d |
Hashes for watchfiles-0.13-cp39-cp39-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d07ee406f06fdd12bf75c8641c58efd5eecc4ce01027716846f49fd30978e1c |
|
MD5 | 7c591b7ac8632ba41e526f401dde6008 |
|
BLAKE2b-256 | 8ed297a3cd3056421493ce8b9b8d4d68bf8a6b0673451ff5f21320d9717e7896 |
Hashes for watchfiles-0.13-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41c05f3ba09257df4b3fa56feddd1f32126569a276c1b1a81c526f67d096e138 |
|
MD5 | 329218818fdabe3d9c2e564f62bda755 |
|
BLAKE2b-256 | ef9fa8fd5bf30bc9f9d8134a6857cb601a428c6c3f12e97eb1a04b7d9b47edfc |
Hashes for watchfiles-0.13-cp39-cp39-manylinux_2_24_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 841f4fe431962cf946b43b80251fe89efff8523856c4a347141b429825f5f627 |
|
MD5 | 4fa05bbffbdb6a992358a71a14141eb4 |
|
BLAKE2b-256 | 45e64b85bfa40d31178125e1cfaade3304f2d0039d41ffb86ad02e123fab7743 |
Hashes for watchfiles-0.13-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 245da818e4cd3e5c4a6261d9b82c1be17db4058331d6a6b374a56ac97b4e2f40 |
|
MD5 | ee34efa26f5f13a95529111acd065e2a |
|
BLAKE2b-256 | 6db3a3d9df3fea5f690207d547b754a2064221ebc314a69e29d59c374ca553ca |
Hashes for watchfiles-0.13-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90f5edc42ee408e91eda36107692f0b2a8b8c1071096cd67c97a7a4a1c1ae9a8 |
|
MD5 | 4eb781b3a3b18f72b829e1706eb232f1 |
|
BLAKE2b-256 | 653c05da5d369523336668d50f0e040dceee7a907823514f7852e5643083cf1b |
Hashes for watchfiles-0.13-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 474421c980b40346a36be417b97ef4e6edd6b65f303be33fc81a4826a6baf972 |
|
MD5 | 376a0509401a8bcea6e7aa3edc7a09b0 |
|
BLAKE2b-256 | 13f2baa7b9a15dc9dc2060144f7b33017409f0bf8043a10679e6c4fc40b1ff3c |
Hashes for watchfiles-0.13-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a591b5bd35921ea736c919c5f52c1d4daf5edec5a8728ad8db817144391f0dbb |
|
MD5 | 6da10074ce5b4966b3f5c65638659b0d |
|
BLAKE2b-256 | 3a427250f3e627d30e24408756b5bdb7804e00421b03160247360ed687799c02 |
Hashes for watchfiles-0.13-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84ebdbabdebb4ecfae3e91aadf7b96ff69623266932c5f3efba9a93ac1e3aa12 |
|
MD5 | 7b124fed55a6677c20fa44c782f6c6f5 |
|
BLAKE2b-256 | e6657c8e2a61520e2c766d12155258dd41e454764d22b5731116386dd7b78851 |
Hashes for watchfiles-0.13-cp38-cp38-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c4f63c1d717b93a13dbc637d2f592a0a78e1b4289651aac3b8d39862b41a96d |
|
MD5 | 24f6ef2f4579fba30349bb2e6d8cdb36 |
|
BLAKE2b-256 | f5439e90b65a60e17e9b28a6ccf9d4ce83ec6f5bf6f1aeedb41610e6cb1beccf |
Hashes for watchfiles-0.13-cp38-cp38-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 426825c2552a1ff6e87eb4406a7c84e46e20c091d529e8dad4f2af252dd24066 |
|
MD5 | 944b0bc7168b6a71e7ad3e9b16060481 |
|
BLAKE2b-256 | baecfbb8235b7235301e8e391536072b2d70c5ce7413d55ed7e196afb6191552 |
Hashes for watchfiles-0.13-cp38-cp38-manylinux_2_24_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80bffe06ba2d8ed044783f7d7dd3f834cb3c4eb2ed20bee69eb18b3cb8b6ea9f |
|
MD5 | 9c2727ee12328c8dbc9d26759d79e5f1 |
|
BLAKE2b-256 | d4bbfa65e5181112c2062f238f6e9edcf948221ce85905c3411f75fbefb9c147 |
Hashes for watchfiles-0.13-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ae76ab695501192ccdf871c6ed6e53a124c43a3145878d121e7fd12728b4c08 |
|
MD5 | 003b7834b6ed1ffdfdcf6f12d7706542 |
|
BLAKE2b-256 | 183f66713f6e43fab1e1a48d0b5ae60ad32a8fa09b00ec89507f9d593683d24b |
Hashes for watchfiles-0.13-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc63ce79a7c2dbbb9e0936cef70782c0a7b60ab774417d841a7e92a1c63af1fa |
|
MD5 | 0f548d342a0cec851c5ea2c42c79af36 |
|
BLAKE2b-256 | b1ae3fe109c05bb40c4e1f51572f924a81b799cced0c7375a5fd6cdb5718aa9b |
Hashes for watchfiles-0.13-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f84ba7f1b5a03bcc34321fb8dc65fcdbf26d25bc3a7b17a80b7fe7125e8a02e3 |
|
MD5 | 915bbeef2eb51abf98e4c723a5dbebb7 |
|
BLAKE2b-256 | 5fc6bff4338583c7657928c9e8a78933d7c791e4af9b4fdaae48783edf25284f |
Hashes for watchfiles-0.13-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d23b33f106db0c8daa3a146e0b5ee3d7729240f4185aa6200b27c6adfef4fe6 |
|
MD5 | ae434b75bf97af6b74daf0d12e434006 |
|
BLAKE2b-256 | 4d63f5a42b315eeebe7cf5c35e6319441c08f7fa7989bfadca36bb8051843a8d |
Hashes for watchfiles-0.13-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39b60f71e4c4688641b1672726780dea219b1c9654c016b1776e0a8f0ca8f5d5 |
|
MD5 | 6d4eda7de8cd259fd975350277707912 |
|
BLAKE2b-256 | e000cbab928fb8edd3cb508c7975fa325d7e13c72e0e797b8cc6aae44a978d8f |
Hashes for watchfiles-0.13-cp37-cp37m-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c92ae6617846865285fcce7d56bb367f7d84685fae72fa9ae359adf88211be90 |
|
MD5 | cce20453164551fed8123543b453102e |
|
BLAKE2b-256 | 4b35d858a7c8cb1b3c4a3c73bd8d42d1381375a241084b001679013f851c5e3c |
Hashes for watchfiles-0.13-cp37-cp37m-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca8c7b2489b3ab22666e7114bf2bfd0f33344f3948480f1526eecaab7f41d1a5 |
|
MD5 | 506ac3503141445b3203236ed98587ae |
|
BLAKE2b-256 | 446821f75ed0c2137ed7c262c627094eeae33863ff47e1bf8409bb859efcedf5 |
Hashes for watchfiles-0.13-cp37-cp37m-manylinux_2_24_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50696bb857e13f2a7f9788fddcbdcf7f4d6ceadc90fe969c0c2c7ea55908a5b2 |
|
MD5 | c3a5ec38555ec02e150d5f6219ace82c |
|
BLAKE2b-256 | be1d1f88bcaaef7b264aa6d9d86208bf5e7539ffe19464608b8cd6749e805017 |
Hashes for watchfiles-0.13-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b324253298f1211adf1be49cccf123bfcbfe31e2f6161493c5617903dc0eaafc |
|
MD5 | 7d4d8dceeddad14c8c50b5db4f07c082 |
|
BLAKE2b-256 | 8c7fad7d296f4d7331e6372ca57d9cbe6090d4abebb52e578322aa089e569f3d |
Hashes for watchfiles-0.13-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7704263193ebbe27b9a02b63a16338fdef9d125f8ce46bba97bc8fe7eea2f5a |
|
MD5 | 5e5b680fc514161b5e93a39c35ea5fc1 |
|
BLAKE2b-256 | ad378e7f692e71ba7ea5ad1de15d803030f473f5a0b512c9f67a965ca59d0245 |