Asyncio-powered inotify library
Project description
aionotify is a simple, asyncio-based inotify library.
Its use is quite simple:
import asyncio
import aionotify
# Setup the watcher
watcher = aionotify.Watcher()
watcher.watch(alias='logs', path='/var/log', flags=aionotify.Flags.MODIFY)
# Prepare the loop
loop = asyncio.get_eventloop()
async def work():
await watcher.setup(loop)
for _i in range(10):
# Pick the 10 first events
event = await watcher.get_event()
print(event)
watcher.close()
loop.run_until_completed(work())
loop.stop()
loop.close()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aionotify-0.1.0.tar.gz
(6.5 kB
view hashes)
Built Distribution
Close
Hashes for aionotify-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d26d9fd6396bab38de47e0ed49bf73752a69243ec1c7aa34967fcc961d5b53e9 |
|
MD5 | 2e4af3c4b6cfba0a3f4b17ed73c1c12d |
|
BLAKE2b-256 | 8ba881fe9c1c12f1c4aa88c8f5a4d14d1b158774079e608710d4d495e5dc8226 |