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:
notifier = Notifier(debounce_ms=200, debug=True)
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.8a1.tar.gz
(1.2 MB
view hashes)
Built Distributions
notifykit-0.0.8a1-cp38-abi3-win32.whl
(248.0 kB
view hashes)
Close
Hashes for notifykit-0.0.8a1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f2174db157c13389e90759ed552f1ac63235b30b058e5b902b0a6aa142d95cf |
|
MD5 | 9265ac148e1789b528cef2b20e66bbb9 |
|
BLAKE2b-256 | 5761ae7c5692cda58d34e6bb924df6fbe1c021ccd77695754c059e8b7b1e914c |
Close
Hashes for notifykit-0.0.8a1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d449cc98d2afea38c78bc3e1c0d66354fbd07619099eafd5430cf2b0120a062 |
|
MD5 | f345ce543045541d0b1ec0c23b5f4bff |
|
BLAKE2b-256 | 651d78dd8bfa0de5665277192342c16af41cacc6edfa0db1686b11b6cd811d61 |
Close
Hashes for notifykit-0.0.8a1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 160011419274949cd4b12512746867f6d7a68eb5e37c3c65f71e768a6f1335a7 |
|
MD5 | edc05ff66710233059b9b6a883fe3881 |
|
BLAKE2b-256 | f3df068eba75f40322e09fbda7697453032ab657959b56f2783f0ad34add7241 |
Close
Hashes for notifykit-0.0.8a1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6837f077b40481789a70def40c8731fb46404eb4832410926f7376952c4bc0f8 |
|
MD5 | df54f7c56636a7f1384a90ec26c7a2a6 |
|
BLAKE2b-256 | e2144746ba3e51839b3cd25c729718d65fa72b1abf9805e63cba5b0b5c1becc1 |
Close
Hashes for notifykit-0.0.8a1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85ab38d050e492172e5875aab734c0755e4d4698f56a2ff3fa8d26c92f41bcb0 |
|
MD5 | 7a9035074901986cf5d1754340a84578 |
|
BLAKE2b-256 | 1a8de8da1e9ee3a9cc7bf9aaf3fdf89cae6b2bad860b6af247ad0e70a3b8c1a8 |
Close
Hashes for notifykit-0.0.8a1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebf5a610331eef2eaf7ceec501317591b2112a50a6d852f58c0b8175ff946813 |
|
MD5 | f52d3e040afd065966d69d4b1fb71991 |
|
BLAKE2b-256 | ab2c7c9d890b946331e24b98f07c75374860a8ac402accec4406db0a1854cc6a |
Close
Hashes for notifykit-0.0.8a1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57127a792646a3880689083d15fbe55f4343dc34c45198e3bdcbd47460952609 |
|
MD5 | b00edd55d9bc671788cd13673b4973be |
|
BLAKE2b-256 | 17fe06f58d815d8c795821b629830e0a0acdb3fd567d33522be9256a7a8d6cf2 |
Close
Hashes for notifykit-0.0.8a1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8d5277f722d2006170c7fe80076fec310f2725ca6341b97d34bb4203e286da0 |
|
MD5 | aa66729ff4be0559e1d29f43e6d42820 |
|
BLAKE2b-256 | 8482c4a437af399deee3a4aa16e266bd0c66ac48799387275964373eed17a4af |
Close
Hashes for notifykit-0.0.8a1-pp38-pypy38_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36fb0940dedcfce9538beb973d46d1318dc9b8f61b03f5b0f43170bad08dc03e |
|
MD5 | 53bcf417c60b1c1d924fb00860f276be |
|
BLAKE2b-256 | a81c6233c8e113ae1c2c0f73f6678a873b9850a52fc542ce3209c6da6fb1a237 |
Close
Hashes for notifykit-0.0.8a1-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72db029628978a7c2c1cd5e7511ee7ebd73c36da3e80cdc64ababc902d3774a1 |
|
MD5 | 42b6ca4ef686e6f4fa45d95055860d71 |
|
BLAKE2b-256 | e4eb51a30a04ed32666d7c74eaa54c24afdaa68c9b01eedef38eb77f83d0af14 |
Close
Hashes for notifykit-0.0.8a1-cp38-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 151e5a2c2c0fa609a1baca6f4cc8b9711284a5bc8120d134b7458be0052bc94e |
|
MD5 | 3885193425171c8a64e75d1bbc0eb65a |
|
BLAKE2b-256 | 30716637dec9e4259c109f694ef0aad3c90fc4b3b593b0b1df2a71bac5da1f52 |
Close
Hashes for notifykit-0.0.8a1-cp38-abi3-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be4f896240d3f88ecb1a6cf524ebbfeb97d3fbff7d6074ebab965f835d290776 |
|
MD5 | b8f7bb6784ef86f51966b65be22a5184 |
|
BLAKE2b-256 | 3acc092598e234de8e4114cd15847edde1f83794e16de6e1dc528fb6bca3697d |
Close
Hashes for notifykit-0.0.8a1-cp38-abi3-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf557f20d775570ae060b36a9a4ca009c91019d1788944565fce44c39ad76f27 |
|
MD5 | 77299f24dce0ed8b0c068b35051eb6d5 |
|
BLAKE2b-256 | 1e0f921eaff5bf247b34e842fde8a8aa5034300726253cb09e8a5c42d9355fc6 |
Close
Hashes for notifykit-0.0.8a1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f3a1fae5bfb7c59e1d2cc098cb19e63ba84a4c3fa36107177b26305d4b79c47 |
|
MD5 | 194253e3fcfdf4f6040a474f625118d7 |
|
BLAKE2b-256 | 85680c81161269fce630b6158962bc59919cc5d2975b04db27651d9a6aec80c8 |
Close
Hashes for notifykit-0.0.8a1-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2439792ffd6db551dde467a4a2c5cfaf96a49039cf4ad042aae08da3ff16e2b0 |
|
MD5 | 01532d848eef65e7ee3c1b5a099759ab |
|
BLAKE2b-256 | 4586f5f0b93f07d64bcc243f343e7a643413e7d01b4bb75575a8a2c9624dd759 |
Close
Hashes for notifykit-0.0.8a1-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f792b40539693d98471c9a0995d6778e56dd640f88a2a0eb4750db1c8b333043 |
|
MD5 | 05b738e28360914534e748169388bac9 |
|
BLAKE2b-256 | 5daf3ccbbd2ed4bb1343f91d1d94dd47a5bba2fba3119c8a1aafbf774723f9ea |
Close
Hashes for notifykit-0.0.8a1-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ff2058527e5c48e5a74f0f9e4771d0bd73a8e218b5e5b4cdb3e69beae6ae75e |
|
MD5 | 8efb4b4c9e6fce9eae994c85e0d5b154 |
|
BLAKE2b-256 | 0ac6df1d811ae33f3b80fca952d94a77e6d0782dcf5b9efcd7f667669aa1a2fe |
Close
Hashes for notifykit-0.0.8a1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f721b92b4beb1b8c14bdc4ac22998b738f9a89c9d028e38bdf85926a1dfd2f1 |
|
MD5 | 628dd9cf9bcb8a7055e417357c27571a |
|
BLAKE2b-256 | 57689d01923155e921408b1c0f8595945dd26c5086b4bf5e434c89a9332bb145 |
Close
Hashes for notifykit-0.0.8a1-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0212a70a8d5b2ff9a37f192a775fade9304b25c4ccd7a0b8fc0b2d59150e2d05 |
|
MD5 | 6f46a7472c812df184c6854ea3b88085 |
|
BLAKE2b-256 | 0436f77b6d0797ec64c09e1df13169fff6e3dcd9cf8f11796cccf10ee7bc0046 |
Close
Hashes for notifykit-0.0.8a1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | abdd47866e30d5c1aa8d9216986f9c2146b271c406b3ced7dc6a4b4b3791fbaa |
|
MD5 | 2880b7b907583d6df831d87b02d04465 |
|
BLAKE2b-256 | 0ce317219418126eb916af9690e031b6c19e6f960aa2660aaa9fd6ae695e75a2 |
Close
Hashes for notifykit-0.0.8a1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4696ec75fff2e41c2c03f726c634246a9719f24bd504b87ef0e685e5656c0931 |
|
MD5 | 370194ff13ba8ff551aa59d3b9a37121 |
|
BLAKE2b-256 | e68ebf7bc40c652e76251fb51845f0742db9e179c2f82029ef9430d6c109f7c9 |