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.7a1.tar.gz
(1.2 MB
view hashes)
Built Distributions
notifykit-0.0.7a1-cp38-abi3-win32.whl
(246.5 kB
view hashes)
Close
Hashes for notifykit-0.0.7a1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d20f82d97964741284e1f15ab2d8d76da33d9c624bf8b02a70101c43a1f1343 |
|
MD5 | e95f5cf7f2513a205891a523b0f957fc |
|
BLAKE2b-256 | 67b49a2508c4fe57a66b188c97ed040ad0549bb15572cd45a61c2b128ccafcb1 |
Close
Hashes for notifykit-0.0.7a1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4ace80ec1141419534430ee731cbaed5b05db0c259072de5c5d495e5aed280a |
|
MD5 | a43603fc3ddfee47785abc21f2e73d0d |
|
BLAKE2b-256 | 77b07b51b3edb9153092e91b7fc8ff5697b6cb743b9e231a47df65f7962d3b51 |
Close
Hashes for notifykit-0.0.7a1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | abc987110ffbbea317e42e6ac44d1b10e046960a68a7e3f7f079ba55cf70db83 |
|
MD5 | 58d24f0bcb4d122b42a9f382fbc5d78d |
|
BLAKE2b-256 | 4e6a716e7a220ad5b59706c9c69931277014d3ec415be6a9318e1b892b02da43 |
Close
Hashes for notifykit-0.0.7a1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 416d7602e175c078626e0a7080f1751e03cd084f956b129a3280673cdf18eac9 |
|
MD5 | cdcca0fccaef8da3a15488b3afa4595f |
|
BLAKE2b-256 | 44edd3c03594f48705b99cf9f5d1d5dcfa23b9a0a1f3fa9975e5bd07401ef9a1 |
Close
Hashes for notifykit-0.0.7a1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6eb64f5670e7501edc3f81dfd24dea20e94db0a723d9a4ff583b87884af058b5 |
|
MD5 | 4a32ceffb5262cf35c5ca76be8a32c41 |
|
BLAKE2b-256 | b6fbd8978eb2c8bdfd8b2c5f8f7a03b551a2ca09d9adacfb6c23c3e8e4f9b553 |
Close
Hashes for notifykit-0.0.7a1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed7a6c716a7657a3f3f89cf9a3fb6981e2bee88e286a2acd5c53f3313fc2ef1a |
|
MD5 | 5c110e69ed09f5fcf51ff0157a83705b |
|
BLAKE2b-256 | b47e05aa35f1e9c1cc97e37a30a235a051d5f4d1964e854f8328451730946eb4 |
Close
Hashes for notifykit-0.0.7a1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9683e642737577b68072c0ed963adfdf8c72a3d873b9ff3c88399134d934a74 |
|
MD5 | d211d39f04c190a105e22760ddaba7d8 |
|
BLAKE2b-256 | da1fcf5688c10aa7a1a3aa05e5579cf31fe30cfb5c1448d1e49e933a8594a0aa |
Close
Hashes for notifykit-0.0.7a1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e6e4cd6cecf4fc82f93f96e18c3f34df92a3539ae9b06de6ffa8cbdda6fcc3f |
|
MD5 | 20a582a135ca3a0bd8220b280fde9452 |
|
BLAKE2b-256 | 907d5c158b3003ec51f54ebe5a0cbd57935479ebd180abe2fe2fb1588c49e359 |
Close
Hashes for notifykit-0.0.7a1-pp38-pypy38_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3417e9d79076e18e5317ed7979f6c7e6b052a3ffbaf832af983e5574c669348d |
|
MD5 | 50e50b2d97320ebf6e06723ccd645f03 |
|
BLAKE2b-256 | 6f647e3b90a5c9e3a4256c4ebf001b0b6fbcd6f865e346632deb9d00b7030a60 |
Close
Hashes for notifykit-0.0.7a1-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0147cd50ed1bbd81556f55479192a1f2b2e54fc35c288ec4095dfcfa3d538edb |
|
MD5 | e04dbb1cf9928b27edb891a2c5abde18 |
|
BLAKE2b-256 | 8ec52f2d7adb2e4a3913880bfde7717bf2489456b47d1b7be794e5051ed2cdc9 |
Close
Hashes for notifykit-0.0.7a1-cp38-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cf3b355c6dbab38a03a557663bcbf891bce9ad281cb063cdf7baf45d72d6de6 |
|
MD5 | b5a74f0da0248d15559b07f77c198ab3 |
|
BLAKE2b-256 | 19333a4d5d4ea103d21e7a05bb6eee63211868033ae91ccb9b35f379f904d5b3 |
Close
Hashes for notifykit-0.0.7a1-cp38-abi3-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b192e2b091ca8ab17f426979d6375115940cea2efbd7709cb3bbf2f81e898e5 |
|
MD5 | 837f44cc0431b347ce48ca6dde98a61d |
|
BLAKE2b-256 | 8f224dc81d4039d430f467fa665b4c938ccbd60e023e8c3fe89a19e590aa7329 |
Close
Hashes for notifykit-0.0.7a1-cp38-abi3-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e78b9874936b9d273fe0749d88041079e0a7a2c29a3cf7da1ae0376c4b5cb0c8 |
|
MD5 | 8f2c88f679de1afa7a3376f4566d0c65 |
|
BLAKE2b-256 | 2fa4336335ca22196bd8e2b9aec71f05b0bf38ddc97db0840919a90ecc5f2216 |
Close
Hashes for notifykit-0.0.7a1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84cbf44967ec590699e74e67f742a1470dbe224ed8fb6d6d0ea106ef18031bd9 |
|
MD5 | e18fb8573a524722ddc74afce48aabfb |
|
BLAKE2b-256 | 1a08869f8e6a0493a385ae66dfc0b07befbba6b3b66c25d80f89ff3d1d8db002 |
Close
Hashes for notifykit-0.0.7a1-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51807e34e13342bf7742486e66cb810abb46003909d64d44d552b4d5b7ddad0f |
|
MD5 | ee0703a52f775fc2ed7449d1d426fe19 |
|
BLAKE2b-256 | 8d7bb6e3fcb8951047f7b08d55eb04d66cc089511851745e18947274018a067a |
Close
Hashes for notifykit-0.0.7a1-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90cc7e67d6e9e141a477e691be041260e1c226eb9b78bdbda01094f31e19f8f3 |
|
MD5 | d4f48d79e16792187b1550a7db8d7bcf |
|
BLAKE2b-256 | 3cdc51cb5f4704f66758c10b4438cf900f72889b803cf219c31863768dd1cb6c |
Close
Hashes for notifykit-0.0.7a1-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49f0d5e96d3e965fea82bf81255c17ce34439aad89b3c102b3ba872ea9a6268b |
|
MD5 | aedf4782f86b47018088bd4d6292fd0d |
|
BLAKE2b-256 | cb6bac57836f107f3aa6454e04ef4031260160902eede99385f4509ef0a901c0 |
Close
Hashes for notifykit-0.0.7a1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e614a5e1a042e31326cfcb82605b0d0f8fc610dbebf43e581e7771db57db2d15 |
|
MD5 | 84baadf91cdee655a2be92201a7feafd |
|
BLAKE2b-256 | 7a23a736e0efbc3e1c3e1e1fd768a64659761f32e66b7e2168e58b2abf883a14 |
Close
Hashes for notifykit-0.0.7a1-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2604d9de1140e0f30d7305846e7646a772e4fad514ab7d3214341c6b3914752 |
|
MD5 | 65b289aa7d4b5e99d685e0f8a481e438 |
|
BLAKE2b-256 | 45e25035ef1ea8ef06b3484c24a9b02d320d31f6e0b5a61e170a9986b462d450 |
Close
Hashes for notifykit-0.0.7a1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b9da3bbd25c31f605f8d20e4e0056bac3d91fe27161c99156c600cd481128e0 |
|
MD5 | c9662141d0dbed5ccfb6e2d83c3aeb2f |
|
BLAKE2b-256 | 7c9ccccca6bd01154320e05759414c24bce249a3200c18090c20ac30aedeeeeb |
Close
Hashes for notifykit-0.0.7a1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 556dc47d0d90e9757fcaca46b77333b0f0a89b4fb2b6fa1169e285dcb1229f23 |
|
MD5 | 8915f18a09a9d7b22f910c1ec21d6da8 |
|
BLAKE2b-256 | 5cfb94dc068ff37b90b8427a4112473d967e38626b878d367b7e40151775e5f3 |