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.4.tar.gz
(1.2 MB
view hashes)
Built Distributions
notifykit-0.0.4-cp38-abi3-win32.whl
(291.1 kB
view hashes)
Close
Hashes for notifykit-0.0.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 977430101afe50a4c5ccb3de7c38f3042ce72583f7c70868f49a0ec6e95e460a |
|
MD5 | a5cde1332a37d432192a7f345c2f7205 |
|
BLAKE2b-256 | 8f7181c66ac316ab57ee70c642549695f462e9eb52d778c20c8c263ca4381cd1 |
Close
Hashes for notifykit-0.0.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 705e5c25623e1bec936819a26958436323e65d41a12c39fe81b9b3354740999c |
|
MD5 | 4a0bebee5d98ddcc86a16f0d1c7483d4 |
|
BLAKE2b-256 | 248faca422cd9486741948e96bcd135ef63270bf88ec06dfa646cb45936b00da |
Close
Hashes for notifykit-0.0.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 661ad0c09828c2895c7a9556f7ae4867d39ac84fddc20c9501ec111f7e681037 |
|
MD5 | d81d70ffd491d74e5285d40c6b0f44da |
|
BLAKE2b-256 | 204a236402ed80ec74bc53fa3dcb0611aeb697a0638ece8b80b6abbe95116ab9 |
Close
Hashes for notifykit-0.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c7802f68be40de44e0b94d373966bbc35c3e8f2094bf520415325377690b37f |
|
MD5 | 4c0851bb2e2548b16f51e80991a74044 |
|
BLAKE2b-256 | 7f07c3392628b60112107a701605035e69b2360bc76b686661c28926e5c075a4 |
Close
Hashes for notifykit-0.0.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ed0c2e50a66fa77b6189b0150ca6ef73b372d4fb7b443b251e1019732c6305b |
|
MD5 | ad27e9663c0276ee71ed0c775086542c |
|
BLAKE2b-256 | 4ba5e7294aac95d9f7bd64008b1870cb32305de810453177dee23f932815e279 |
Close
Hashes for notifykit-0.0.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5382b88a90d654c6141b632e1bf7a4e28e9da7c22f002056749d2ff55a9bb59 |
|
MD5 | ae796e5e15aad292da97ffcb41ca4a63 |
|
BLAKE2b-256 | 0a0e367bbb3af6c052394decf463ece27ac2b787f2e9e58edc3e7b1679f030ea |
Close
Hashes for notifykit-0.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ed0e6861f059d3484403c2c07bcee89dd904c64d02af8250054758eae8fa597 |
|
MD5 | 8bb46a4ac1a921fe0606fc8170d3168c |
|
BLAKE2b-256 | 4fa71029aad2fe70dd290475665ad0c34611467e631c61d4d54a9adb2bda6d8c |
Close
Hashes for notifykit-0.0.4-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0558e91984e284f92a7ced031778cfa435b09a8081c2b04ab61332e32d196da6 |
|
MD5 | 3802543caa2bece126356d4d75c959ec |
|
BLAKE2b-256 | 49bb6925652c5638cd7ec4f79f267e823ce13060d98b482de688a6e1efacad5d |
Close
Hashes for notifykit-0.0.4-pp38-pypy38_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d089a1b7eff687e1e9b46daaf042bb72f93b1ad12dc33e25d10ed8ebf0766e81 |
|
MD5 | 766efa3164f0d9668d0bc7a88a10a6ad |
|
BLAKE2b-256 | 01a667827f335f1d8c843a499a2a86ed7fe1dbb27d1ccce42c6d3d1e1bda8e93 |
Close
Hashes for notifykit-0.0.4-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9690c36a95cf1e85f16a152a32ea14820c1bc56df322b1d62dcfc439011c9ee4 |
|
MD5 | 9b7b884a8e6306122179ed6b02ebcb33 |
|
BLAKE2b-256 | c4cad34948d7c4a5bed1005b959a01cff52c166fcef4547944ea1d3bf29a60a3 |
Close
Hashes for notifykit-0.0.4-cp38-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5cff556b624d2dd774a31258e88db58f3f992ea1cf8deda0c1969f87acbcccc |
|
MD5 | 532929b47ff1452ae7ceedf51f0be79d |
|
BLAKE2b-256 | 722955c64ba8996e50c15108d6c88815d30666076e3c88602e61291072a87d2a |
Close
Hashes for notifykit-0.0.4-cp38-abi3-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b01854880e3adbed79f50aef48669e930d7870a226968bb306d4b5d167768b5 |
|
MD5 | ea570948eccad2a5a36f2e4a4fc6c9c1 |
|
BLAKE2b-256 | c9b3865edc074e518e9f50f02342d3999d3e32be132b10dd55a5f74795b804ab |
Close
Hashes for notifykit-0.0.4-cp38-abi3-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ead4af8c3164a3f25d99de490cef1ffe1814f0acf229f4a197b153e9cc460e61 |
|
MD5 | cc19c7d2d135dea86620a4501b96ac69 |
|
BLAKE2b-256 | 2b0ba289333b34f7bc9766747da99a4e03f88c0fafe202503bea7bc9d548c76b |
Close
Hashes for notifykit-0.0.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 994d3fbe14b710d2ecfd1ee2cbf686a1bb58401a9eed830a80566eaf09841826 |
|
MD5 | 7b89967df9f11980c8bab299ae03ca79 |
|
BLAKE2b-256 | ae15ed4692e88af85dcc7900bc24f04eca93040e7ffab65cf8d9bf2b78b72204 |
Close
Hashes for notifykit-0.0.4-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5cb46d604f718c4eb18475ecee15e109588abe63732f8a5ce20a33d5db16c65 |
|
MD5 | 46218bdfe051f35511357361fb10fd3b |
|
BLAKE2b-256 | cd3964467951fdbe4ef603f43c1d283ef6233a4c05c659febebfd8e64a821559 |
Close
Hashes for notifykit-0.0.4-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | afef31a8a1cabfb09494bbf34ec51e058d7a2a0f324c60c5a12801ca008a0cc2 |
|
MD5 | 1261405e6dc5446fdea0af33aadcdea7 |
|
BLAKE2b-256 | 40e3055cac57328793e8cdd4d58254e80bac65d46eed97c36c2874f83eaff4b1 |
Close
Hashes for notifykit-0.0.4-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d113fffe4974ec45328c761939f850b70f973fdae92273170989340d6e55cb3 |
|
MD5 | 0cb1dc18eabbd1470d2a86ac12ead4b0 |
|
BLAKE2b-256 | 0cdf9d8959d932294b82d4941876537d09869d159c54e7fb28cbf5c8487df758 |
Close
Hashes for notifykit-0.0.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 388a1b4620e9d3c79a9e0a307dfd65a15247944163db178ed854f3e8f9fcc178 |
|
MD5 | 9ccb230767d12982b6ab22d2fea9fa8b |
|
BLAKE2b-256 | 20921f3bb8973d828c7d58a525dc9dcde74d6f97ecef9bf2c0dcdd4b90c2e05d |
Close
Hashes for notifykit-0.0.4-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d81d4f7e143e8fcf1e44e0d82e11028d54a7db60f0ed79e9ec88da550278b6bc |
|
MD5 | c3a040cff0fbfccbdcfaee08d3be0449 |
|
BLAKE2b-256 | e7f55484889591555ef60f936d0c1bb752cf12641c9d1112877d711057ab7cfc |
Close
Hashes for notifykit-0.0.4-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c847f69f356d88a09aa0e65f2c7fae2380c06363c51cf843356a51f18d7579d6 |
|
MD5 | 6cd15a48ecc116b4ba6e0337fa8dee3a |
|
BLAKE2b-256 | 2e51f87a970c3162aba68c7c977d38b335b85b6bca098f0b87d78dcf54908197 |
Close
Hashes for notifykit-0.0.4-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4afefc37cc7f3f6ce1ffa34ad00ddfc77cae39da5f7437f456063ce08ee03c69 |
|
MD5 | d46c2180f6ccc1c02b6a8bafeb1c974c |
|
BLAKE2b-256 | 8907fc1488ac8beedf2691ff33de942fcf9a8f3f1eea16c52d62de402e404df2 |