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.6.tar.gz
(1.2 MB
view hashes)
Built Distributions
notifykit-0.0.6-cp38-abi3-win32.whl
(246.0 kB
view hashes)
Close
Hashes for notifykit-0.0.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | caf1c29a91cc876c4990c1e19dd964a0f8d328e145ce18a3cb0eb0e415246953 |
|
MD5 | 407ff0e7c936a1c2e39fe12b5f9c7459 |
|
BLAKE2b-256 | 986d759cc885751044dcb6e999bff84b36749e4588c56e969dadb3f3826f2806 |
Close
Hashes for notifykit-0.0.6-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c25d6eb0694139b750107c7de2a936755e748160331bf2e8f5063fb22c614b72 |
|
MD5 | e78a10df41bb10770e02db8eedc5ab72 |
|
BLAKE2b-256 | c328cf30845a9dfdc70d72142149bef572a02b538a5e65cbccbbc9c0e016a4db |
Close
Hashes for notifykit-0.0.6-pp310-pypy310_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1803eec86fa8ecc5a556ecad1589f5e2f2c62be9c04532df795d99223a04bf6f |
|
MD5 | 5e9642f380ea5e9f956e9054fa7d57c8 |
|
BLAKE2b-256 | 3570f7eb1a0b49ba4260364f73e372f9a0c0837c9e978d0d325ec2fd1407af3d |
Close
Hashes for notifykit-0.0.6-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bee88e4ae56f19684fd6d04cbe813f20dfb46e1e1d2d007ffbb03a131721c32b |
|
MD5 | 694e51c2b2caad6f8b4fdb9254af94ed |
|
BLAKE2b-256 | 1575fe65d8962152f56929e78e53e182696a1f3bbfaa8f1ae440bc201fe4cddd |
Close
Hashes for notifykit-0.0.6-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d80190f971120529032dface44d5d7bbd4cfba7dd513cd078323e003bed1beca |
|
MD5 | de160e107493bfb72af69b3dedc96c6f |
|
BLAKE2b-256 | f706fbf2e20b970cc8d20ca980fe321cfda28154a2901f7e41deabac73ea4f99 |
Close
Hashes for notifykit-0.0.6-pp39-pypy39_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fbbf201fc12c9fde3f627306ccd2fc0e3db68eddd2ac038a4aab15851c96b00 |
|
MD5 | 3b950ae2bef10a42b3ba894a6f98d6c7 |
|
BLAKE2b-256 | 79320b014e9410134d3333398e6ba5b1009dcc87b90095560868883652ae1ea4 |
Close
Hashes for notifykit-0.0.6-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e22c43cdff880c225c2ae781f4644b4e07fcf03c4324fcde96f09e02e85b7d41 |
|
MD5 | 26347c3ebc0b30e295d7b827d57989bf |
|
BLAKE2b-256 | 873e857dbbf0a21f5e690bf55a7e66df8bb1fdf3a3bab5c75b804c806ffa98e1 |
Close
Hashes for notifykit-0.0.6-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fbef5f29fe27139ecb077950d1c841f325b8d4fd3d0a503baa58e0017010275 |
|
MD5 | 27731ca1e43fd87335afc3666f635c93 |
|
BLAKE2b-256 | c217a826a3569287ab0013173926bc4521f3868a487ebab52e54d3bce312bd57 |
Close
Hashes for notifykit-0.0.6-pp38-pypy38_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e206140632d3b8573c4b94b0fb95dbed58c302342c272409e3667a01447671ff |
|
MD5 | 4fe1231613ff0114a4cb8207b06b29cf |
|
BLAKE2b-256 | 6d9b2e09ab54a51b61055aae7c801a53b209cea8c5edf553ad2fac0c39f2e5fd |
Close
Hashes for notifykit-0.0.6-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cbf5e8656f3758bc3d19626ad7ca56645d0cbeb363e25e38453d155a00c5e97 |
|
MD5 | 12927cde2b89b29b225e23600bbb6b34 |
|
BLAKE2b-256 | fac7013b701c6945dd5cb84c8e9d3b5d2b0d353728e19c939f0dec1443bbc4d3 |
Close
Hashes for notifykit-0.0.6-cp38-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bd18b448de60b825aef854b1d60553488e51debc7795b68267c001002d493e7 |
|
MD5 | 39566a1aa87e93ba4832db8f0cedb7de |
|
BLAKE2b-256 | a0f38b89edcce2c9c8492133177b664faedcee1775bcb0de10e481547a3c478d |
Close
Hashes for notifykit-0.0.6-cp38-abi3-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2acf381da035d0161e46d63408b2ebae0de1a7250e85311de465f31dcbf9fb6 |
|
MD5 | 7fb0f3320847bfa47439115a812d657e |
|
BLAKE2b-256 | 13021a06d5b8f910deb25aa20c89b9f1a215bb329c29bd9251e075bd7b0d99cc |
Close
Hashes for notifykit-0.0.6-cp38-abi3-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a38973db2b5ae3a8880c559843b11bb52d3a66b986a31475ccbc252a7afde4cb |
|
MD5 | e76ea9ba3c40202b2602ebb0f52a3fe1 |
|
BLAKE2b-256 | 9a101df1f9545f3ce69609ab3d56dceca6de32fc824dca51a97cbbccc746d795 |
Close
Hashes for notifykit-0.0.6-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcf58b0d545764e5c5113f9b60429ec31fb63fe84ebbc6e426940ed18b1e8c46 |
|
MD5 | 901fc33bbc3903ee0b4987c6a10bf68c |
|
BLAKE2b-256 | 45d86ff1bfa2f1da1405c540d72a16b392cedde71ac9ec569c7d8bd772208aa6 |
Close
Hashes for notifykit-0.0.6-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4302e962e4eb82e0d667e7d43eb3660b818da5f74746cbdc2540642e61a63d64 |
|
MD5 | eb7ec5c9bd668272226f201fa265ac35 |
|
BLAKE2b-256 | d2978dc12beb4bf5779aad123643f7f1891960e792b6f47270ebd44debf1fabf |
Close
Hashes for notifykit-0.0.6-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39c526e147f3bf14cc40c97c42de0690dc55aed48bc36c8bb46bb76eb0588de5 |
|
MD5 | a44dba484757799a2e3e8e5931b5a97f |
|
BLAKE2b-256 | 05169d54ff8af7430c2bfebf374c408dff8acb9bb4b1c6c9a65ea98585f89377 |
Close
Hashes for notifykit-0.0.6-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 184f9b800dcaa7511bcca251ae95ed804523b8f33e22ced92a45538bb5e40ae9 |
|
MD5 | db852b8057f2486491258db67dd7d923 |
|
BLAKE2b-256 | 8b6ebc5380931f2c4b16f18fbe8bc7817b7c898ff54675614ce81c4c382eb219 |
Close
Hashes for notifykit-0.0.6-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcbd2828833f38df56784a63edc381664ab29dea9eecb63c538acd21ac427c04 |
|
MD5 | 5ceb929793d5bba63f1ea447ff6b8b08 |
|
BLAKE2b-256 | 24c6a48a6e82b9ea772251e2c385f8e14d538d0d7ac26fb0feb71cdf785d0a80 |
Close
Hashes for notifykit-0.0.6-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27e1cc36deefa127a3a9fe1c6c7c1edd86a14385926ed5ec2e152d4f7ba61c33 |
|
MD5 | 269815271ad1c1926a3fb79b48946010 |
|
BLAKE2b-256 | 7a4a306835a5f8bd0b499d363e6feebd79513c7203217674e3751523d1b45bb1 |
Close
Hashes for notifykit-0.0.6-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06a883b49d23829f9250f0d2677d6c095255351d987c4c2adead45925d49b941 |
|
MD5 | 2aa02bc12b6fb72cbc8130cd2ea86f18 |
|
BLAKE2b-256 | 516f02fd72be4cec09fad1da97104cfaf9be0b226ee7b7e53fb1d6df6f4f380c |
Close
Hashes for notifykit-0.0.6-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aafd85f480c780032ea0a871809a4daaa77b16c91aa8ec343e18823a38da08f |
|
MD5 | effaec5e90d60f6b81874ddd1944db29 |
|
BLAKE2b-256 | 9eef34c4cb7fde6d91c74716ee185f0e02629f0e9854dc62a6a22cacd916bca2 |