A modern efficient Python toolkit for building applications that need to watch filesystem changes
Project description
👀 A cross-platform filesystem watcher toolkit for Python
notifykit is a set of components for building modern Python applications with a need for watching filesystem events efficiently.
[!Warning] notifykit is under active development right now
Installation
pip install notifykit
# or
poetry add notifykit
# or
pdm add notifykit
notifykit is available for:
CPython 3.8-3.12 on the following platforms:
- Linux: x86_64, aarch64, x86, armv7, s390x, ppc64le, musl-x86_64, musl-aarch64
- MacOS: x86_64 & arm64
- Windows: x64 & x86
PyPY 3.8-3.10 on the following platforms:
- Linux: x86_64 & aarch64
- MacOS: x86_64
Usage
import asyncio
import os
from pathlib import Path
from notifykit import Notifier
async def watch(watched_dir: Path) -> None:
with Notifier(debounce_ms=200, debug=True) as notifier:
notifier.watch([watched_dir])
async for event in notifier:
# process your events
print(event)
if __name__ == "__main__":
watched_dir = Path("./watched_dir")
os.makedirs(watched_dir, exist_ok=True)
asyncio.run(watch(watched_dir))
Features
- Simple Modern Pythonic API, both sync and async
- High Performance
- Cross-platform (support not only Linux, but also MacOS)
- Easy to mock in tests
- Makes common cases easy and advance cases possible
Sources of Inspiration
- https://github.com/seb-m/pyinotify/issues
- https://github.com/absperf/asyncinotify/
- https://docs.rs/notify/latest/notify/
- https://github.com/samuelcolvin/watchfiles
- https://github.com/pantsbuild/pants/tree/612e891e90432e994327b6ddaf57502366a714c0/src/rust/engine
- https://github.com/pola-rs/polars/blob/d0c8de592b71d4b934b1598926536f03e10007bd/py-polars/src/file.rs#L206
- https://github.com/TheoBabilon/async-tail/
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
notifykit-0.0.7.tar.gz
(1.2 MB
view hashes)
Built Distributions
notifykit-0.0.7-cp38-abi3-win32.whl
(246.4 kB
view hashes)
Close
Hashes for notifykit-0.0.7-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 878f5c9c798393cd06c7a6ea6787d878f8f12a21001f9ab680983149d6d1ff58 |
|
MD5 | 86a81c299ca65913d9a8ba84d63fde01 |
|
BLAKE2b-256 | 0e392ffdf8b73b9ac63c05039bd6c2016ce175a04262f0c9a938f97a533b8daa |
Close
Hashes for notifykit-0.0.7-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6b1c22777c79a3a1dc4fefc06587e65ba7378e434b892def1ef2d85a376ed33 |
|
MD5 | 23d91229badcd4dca49535b2f9cefd3b |
|
BLAKE2b-256 | 4deb1e952b8a2e2f2ad13df8ba6d5952ff9ce156382af877d0c89fc8676a2edd |
Close
Hashes for notifykit-0.0.7-pp310-pypy310_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88990a46960847685746185dfcbbf3bcc39f7dc62e30c84d1d8cc5a1ad982f1a |
|
MD5 | ed503ab165d38e58606eafcf277ea418 |
|
BLAKE2b-256 | 136b305aad34bb0811610d00143b705cf19ecf65c75c9bbc9deaafc328d07e10 |
Close
Hashes for notifykit-0.0.7-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3d5561ae44d0947ee172ecc5c3b6f9d826e2966f5536b868b0d52527aa0da97 |
|
MD5 | a2c809c6a0bcb7225108f925b7bcc137 |
|
BLAKE2b-256 | ec16750db10401024a20ddb7f2a50547fa6b8bf2e7d77bb2935ccd541159faf8 |
Close
Hashes for notifykit-0.0.7-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a871ae53acc1af03c0decc82e9366bdff587b9771c7b118f6bc39c5a899de9b9 |
|
MD5 | e3c4b6a031009f9f04eb9570f3a034ce |
|
BLAKE2b-256 | d68757c12e75d1223511d25b6a2806464d06d0351150410727853c9818d59ca1 |
Close
Hashes for notifykit-0.0.7-pp39-pypy39_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58bb687fb1e991607ea74524d4d90e37faaa760a25c21eff4cbd832f332371b4 |
|
MD5 | 89d23cd2834fe736d8333c1e2e4d2f2f |
|
BLAKE2b-256 | 15371f43f49c755db0da53f796d394eda67fb3fdefaeea1170cc0385d910fa2e |
Close
Hashes for notifykit-0.0.7-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36cee6f68d3f62679889a48c0310bf31043c57feb2843a6ef4ab130135b0dee8 |
|
MD5 | aa4f599f71873a363192a19f56420274 |
|
BLAKE2b-256 | 617949c6e553d0c3f001ad529ea0ea1d5d3789403cbb46ac2c5251b0223fe614 |
Close
Hashes for notifykit-0.0.7-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0261ab511fca5f97672bcb465d13ff922b8fa065ff1993022a9f5fef2911705d |
|
MD5 | 12787582fe2658eb442046bd100dc54c |
|
BLAKE2b-256 | 0923853af82523fe0a745200c97af793ab6da209c0e2b2696bd3736a6e6a6370 |
Close
Hashes for notifykit-0.0.7-pp38-pypy38_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aed6f25fd28dd72370bb1f0733126d10e4e0e230ebdee6eccaf9bb4113c35c1a |
|
MD5 | d33bd31f3c78e116067ef5e99a458946 |
|
BLAKE2b-256 | 3a9245c10647bfd70454fb65a3f8e6211487f19f9bf279eeb0e78b37abcd271b |
Close
Hashes for notifykit-0.0.7-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fe5c9e078a25beb97c06b4cf777c42ec8de0c93b11d0ea5d5d9e463c42ac0f1 |
|
MD5 | e6e02e1c963bc4cc60e759bf26de3358 |
|
BLAKE2b-256 | d5c136ee03c6ffe055ad2187650924eda1ff81bc671cfdb1f805718543dfbf9f |
Close
Hashes for notifykit-0.0.7-cp38-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e79800bb213f021bcef98eb7e77cfbcbea2681824ef740296f6c49e64d630b7b |
|
MD5 | 12b5cdff192fe43e52285ff0e091f498 |
|
BLAKE2b-256 | 9b83a5cff78290a71dc9c0b57aa4b381e38addec078af48960568c6bb35cfb99 |
Close
Hashes for notifykit-0.0.7-cp38-abi3-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 276fca1aa18d44cd6a1c3a95a8c753a58f882b4a84446c445e4663b2d677f271 |
|
MD5 | cd77d3f92f16da438f2c87cabec471d0 |
|
BLAKE2b-256 | c5212d1f2a58392938e1e39bc94073c637822b07fb7eed8bc4ce7ffcfae63ba7 |
Close
Hashes for notifykit-0.0.7-cp38-abi3-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6c4e77c7dbad8cc595e272fc9f64f70dc7dc2f1af033ef146dfefb0b8b9a2e4 |
|
MD5 | 511075862d0680f6f0b93b9a01aab065 |
|
BLAKE2b-256 | c85e34c7da922a91af118f1e4cba9f4e4ca5ec56b9af6e0228f6187a1bd454c0 |
Close
Hashes for notifykit-0.0.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2a65279fe75e1a6c9d71893857c4e9c6203a81cca730559007be04c3fe6f447 |
|
MD5 | 416ef15029ff914caa96ca95c7c9ae05 |
|
BLAKE2b-256 | 8ee467c29882303df9d7b0dbe449cf302b867c233204c2e9bc86e7214d9f74ba |
Close
Hashes for notifykit-0.0.7-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5429a0be22f2c6c3fba60f680e20e04a8e8f9d33200b7b9a24b3608a48ac555 |
|
MD5 | 7f47ef07091549ee300de680c9269942 |
|
BLAKE2b-256 | c11cdb416ed917300e44d41f58f44000e2316d2b073687746344b0c0f8143b1e |
Close
Hashes for notifykit-0.0.7-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3e446473e98d1021c666176d27684c4371a8badcf5e4db7176f9d2b0f098ea6 |
|
MD5 | c9b0d29b2d8fa04737c210a5ca3e77bd |
|
BLAKE2b-256 | 0e206f8e956bb74903f081b0f7ebcf76e84b432d9238fb5c4374d393fb6ee95e |
Close
Hashes for notifykit-0.0.7-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78105f783c368b17bdaa143dbfff304d1718a496cfc9d834ef7058f62c4c2add |
|
MD5 | 528bf0e8286aa1fe9216aca4acda6b9c |
|
BLAKE2b-256 | b3d6cd95afe4772cf619104e878925863d373c4bedffe90a0107ad32f87ffdc8 |
Close
Hashes for notifykit-0.0.7-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a6b487362c11e118503552952d982eec2b5107cfdf8de1e81e85fd9f9532a47 |
|
MD5 | e54e35f0689360b17d6f490488fc22b9 |
|
BLAKE2b-256 | 999a481b31e45fc5444457d26b900eb2870ecc9ae37003a7b824a212a82b99bc |
Close
Hashes for notifykit-0.0.7-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a37952f2718850a1a2e76adc39690a7086578f5e07623764cef6f6b1d9884335 |
|
MD5 | c9113c28fc8948684459a8aabf1ede28 |
|
BLAKE2b-256 | 0c77ccebda66078929066929486a847c4b42357528a8834bacb0f886ca6bb1ca |
Close
Hashes for notifykit-0.0.7-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6f32ae9c071358c851d49a36c0daa51a7b4566f7e10532474f6abf410c494f1 |
|
MD5 | 533ca11ff8aeddcf79e8c8ee7e189346 |
|
BLAKE2b-256 | a851b340328eab94fbc48f8be2b393eec88809ca18bb5bd08c91a37de05a0564 |
Close
Hashes for notifykit-0.0.7-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdb85d14ae362c73316a68a374722603a47b9f940b766e0fd0a7554766677a97 |
|
MD5 | 35d895a226f92bc7ff6b3418d2530808 |
|
BLAKE2b-256 | 6fab7f3fbee420c653b3356501575d3b7b79be4bb12879d20292a9eac81c6559 |