Skip to main content

Asyncio-powered inotify library

Project description

https://secure.travis-ci.org/rbarrois/aionotify.png?branch=master Latest Version Supported Python versions Wheel status License

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)

Uploaded Source

Built Distribution

aionotify-0.1.0-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page