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.3.tar.gz
(1.2 MB
view hashes)
Built Distributions
notifykit-0.0.3-cp38-abi3-win32.whl
(290.4 kB
view hashes)
Close
Hashes for notifykit-0.0.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0a2bdf8f265f3adcfecc95ad6d7505958c20f18ddb727aa2b7338f1fd18b031 |
|
MD5 | d47e36f5caa9b7c8aab239b152f12081 |
|
BLAKE2b-256 | b735f4a304fb5047f911162d05ba4e097a312da7d84d4ff22d98a21ec40ec557 |
Close
Hashes for notifykit-0.0.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 636aa4a4ced22d2283eeea04c2c2a96731dc3d3ba16a97538a2472dc6c678460 |
|
MD5 | b5e1a4386382fcd33f14ae77008f7bd7 |
|
BLAKE2b-256 | 27a6f9aa562633ba29157870ba75f0211012374d991b2873bd8890f12f134039 |
Close
Hashes for notifykit-0.0.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e81f0737ad5a2a74e4f878520b14d710f9f49080fa4307a3c4ce850ee0233b5 |
|
MD5 | 57156c1a90d1b7677a0a2f654ee23d63 |
|
BLAKE2b-256 | 57f98b7ba10f8c539aaec0532188b122a37fce865fa504c911f8c7b985d98822 |
Close
Hashes for notifykit-0.0.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec92930288f7e2e9947922f30458aed2cf6e793c1937209184c9942accb30074 |
|
MD5 | 12d8a62200648a28e9896598a0953105 |
|
BLAKE2b-256 | f1ca8aa8011196754e6657b4e86d33498e8568b0074cac4a60b9968518604067 |
Close
Hashes for notifykit-0.0.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5132d11ac092fc0a0cf4b723224db057578ec82c4ad26b500414c8fff04e586 |
|
MD5 | c623377b17b592fc18e445e8c3847a95 |
|
BLAKE2b-256 | aa023df1fba02f25ff5258b124dc12800ef41f2cf12e9c4d3179439828299ea6 |
Close
Hashes for notifykit-0.0.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ce8a3ab59a2a2f203eaf619105730e6b3c46c728931858e355a361370cf8898 |
|
MD5 | 1e159f1bd813520fa6785671114cb85d |
|
BLAKE2b-256 | 5b93c73583e1aa5e30fe8e3fca9b44a5e3f272f4851e89833f861204eb56ce29 |
Close
Hashes for notifykit-0.0.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00de66ff9bdabaa2a20e9dbb0e9350d6816f745591e61a9de2376ca8006b13cb |
|
MD5 | 6157ba0b49bfaeea82cb630825c33c1a |
|
BLAKE2b-256 | 9a0d7cddd594cab25b7add6c42a5ac3159b838df4d930e9a23355859878219b5 |
Close
Hashes for notifykit-0.0.3-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a095e67aaa692de2f10a0a59702d3e2bfec37766b660bd9a48a7239da5b8fa51 |
|
MD5 | b541e1fc7f748074f3ca4900b983faa2 |
|
BLAKE2b-256 | f741d68517e2f5bc4be14283b8ff1f5ac2b0e062d8af5f91144438c020facb0a |
Close
Hashes for notifykit-0.0.3-pp38-pypy38_pp73-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a08b10d155fc5a687f2505beb446f31dda77e485d2b2187fa05f5b89d3bf7d7f |
|
MD5 | cacb14b5756f91afb5d9da0a8d17dcb6 |
|
BLAKE2b-256 | b6d52cb58e3bedf5854a2d047017f7ebeee09dbcdf100e64c86637aa0857825d |
Close
Hashes for notifykit-0.0.3-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e99d7b635118930523f69e309550371bdfc839f3417e67790797c9570bb11899 |
|
MD5 | 5949f0512602c4898a7c104b979d517d |
|
BLAKE2b-256 | f00d8d785ec1843ecbc2e7ba319ae69b347edb047045168a087535ded5cfa67c |
Close
Hashes for notifykit-0.0.3-cp38-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f1a51dd2d1cdfb9003038b51887c7b32b79fc7bd14eda21720ec7021461ef07 |
|
MD5 | 8cab69a19f5b86dd658aa71a5d703ac8 |
|
BLAKE2b-256 | 077229821bc7d00a2347437d1cda317c41dc39f54e7e033be324d12bd13935de |
Close
Hashes for notifykit-0.0.3-cp38-abi3-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77008e17b5cba72ad09e0062a1c14daf86cb4e5134a4d2cefffc078061561f8a |
|
MD5 | 983b7e2d42e71ffa38824a54d15ff254 |
|
BLAKE2b-256 | ff11e7d862f7ef55d10e7bdd8311c80c373fe992bb9c565e90b689beff3db373 |
Close
Hashes for notifykit-0.0.3-cp38-abi3-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79edc61cda8dbf0f9f872bb47c28d626b32ea2ce419a309e97c5e1ba1d73f33c |
|
MD5 | da73e872f46e0ef95c8bd0c3fc55dc9a |
|
BLAKE2b-256 | a31762b337ff639fac05ffdbcbe3dc72f4e21f7e3e7c70da72a0d28fbe711aa2 |
Close
Hashes for notifykit-0.0.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b200015adf22887646460faee040999c0ca23893b6de70f9bf3627dba070676e |
|
MD5 | b6d2a675d8b642c77615b57ab86b6d89 |
|
BLAKE2b-256 | 9fca445abe06549c8cd013b6ee0746cbe29c9661afd0452492d9ba3c3fa48f23 |
Close
Hashes for notifykit-0.0.3-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98438a33530ec20a1e283aec5e0b17d250e9ab52a589bdc1fd94eca7ba53da38 |
|
MD5 | e02b080da79f29d795fb2f0968d1b17a |
|
BLAKE2b-256 | 9f41a36cb95b05e10d15edb5ae0826cb3fa71cb5e879bdad6258b8747876564a |
Close
Hashes for notifykit-0.0.3-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd9ec801177672ebd0496b4306750a33571cb310313dea30238e144ea5537ac1 |
|
MD5 | c5bf18ed35510d9e2d11e21439b16d33 |
|
BLAKE2b-256 | cba464a4593381868f58b8bc8e34ad7a16db916c08ed64eb1b0978ee619e1390 |
Close
Hashes for notifykit-0.0.3-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bbd253b005b5e5fe230fc9cc50d421998e59f9cd3bc437e2dac3c0b485f6fdb |
|
MD5 | 577f3cc4d272b18d9a1965d03a60a569 |
|
BLAKE2b-256 | fa934bc168a6788c4391427d217e0f75561c1a7d5c7327830beec8ab68a837e3 |
Close
Hashes for notifykit-0.0.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec5fd592c4e57bcf8e8bdb42f730bdd488749dbc8800127d5ba3da7736aaf429 |
|
MD5 | 8f9a59e38895f0f24b04f5d718625c13 |
|
BLAKE2b-256 | c8699f69ff79b04d6fdeabbc00abd576aea554528003f6700ce4b203c54bb358 |
Close
Hashes for notifykit-0.0.3-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f7eba42786a849078d4f87dfd953644683b51ef876d2fc49ad476297f76185a |
|
MD5 | 412de26e50c9b700f78b8d6058e2b6b2 |
|
BLAKE2b-256 | 6ba55e69aef065817cc5e4cdc65bd161fc414209d8c7200e3f0d80679bc354dc |
Close
Hashes for notifykit-0.0.3-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e62e2138cc79e003e27eb20109ef744b6e8fd9006da21f5101c10b607115ca25 |
|
MD5 | 1ae2dcb74cfebaf6cd3a4b7f746f9ead |
|
BLAKE2b-256 | 6263ad761fa2c93b90b8391b4075161c61d5a7457f35d87e6fcbf546cde2e792 |
Close
Hashes for notifykit-0.0.3-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a42538bcd759b0868c8d889d105f8cdbe914fe7648ffa8259200161cf97e2e3 |
|
MD5 | 66eae6b80e961f8ba44d13167c312dd6 |
|
BLAKE2b-256 | 03de2ac4098d71324b34c08468e904f60e5c741221598e54dafc7dfbb927dea8 |