Skip to main content

Asyncio-powered inotify library

Project description 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()'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()



An event is a simple object with a few attributes:

  • name: the path of the modified file
  • flags: the modification flag; use aionotify.Flags.parse() to retrieve a list of individual values.
  • alias: the alias of the watch triggering the event
  • cookie: for renames, this integer value links the “renamed from” and “renamed to” events.


aionotify uses a system of “watches”, similar to inotify.

A watch may have an alias; by default, it uses the path name:

watcher = aionotify.Watcher()'/var/log', flags=aionotify.Flags.MODIFY)

# Similar to:'/var/log', flags=aionotify.Flags.MODIFY, alias='/var/log')

A watch can be removed by using its alias:

watcher = aionotify.Watcher()'/var/log', flags=aionotify.Flags.MODIFY)


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for aionotify, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size aionotify-0.2.0-py3-none-any.whl (6.6 kB) File type Wheel Python version 3.4 Upload date Hashes View
Filename, size aionotify-0.2.0.tar.gz (7.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page