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 details)
Built Distribution
File details
Details for the file aionotify-0.1.0.tar.gz
.
File metadata
- Download URL: aionotify-0.1.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f288f32bdf44f6f500247c35b2b3b5eafb4dffd6823b7881adb179d37672675 |
|
MD5 | 7b2e827dd9d4eab93f73c85317766a1a |
|
BLAKE2b-256 | 3c48e29d861163dfdbe6bb7ef09ba3544e93b5652f4decfd25b6dd9ce939e064 |
File details
Details for the file aionotify-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: aionotify-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d26d9fd6396bab38de47e0ed49bf73752a69243ec1c7aa34967fcc961d5b53e9 |
|
MD5 | 2e4af3c4b6cfba0a3f4b17ed73c1c12d |
|
BLAKE2b-256 | 8ba881fe9c1c12f1c4aa88c8f5a4d14d1b158774079e608710d4d495e5dc8226 |