



watchdog 0.9.0 documentation

### Navigation

* [watchdog 0.9.0 documentation](index.html#document-index) »

Watchdog[¶](#watchdog "Permalink to this headline")

===================================================

Python API library and shell utilities to monitor file system events.

Directory monitoring made easy with[¶](#directory-monitoring-made-easy-with "Permalink to this headline")

---------------------------------------------------------------------------------------------------------

* A cross-platform API.

* A shell tool to run commands in response to directory changes.

Get started quickly with a simple example in [Quickstart](index.html#quickstart).

Easy installation[¶](#easy-installation "Permalink to this headline")

---------------------------------------------------------------------

You can use [pip](http://pypi.python.org/pypi/pip) to install `watchdog` quickly and easily:

```

$ pip install watchdog

```

Need more help with installing? See [Installation](index.html#installation).

User’s Guide[¶](#user-s-guide "Permalink to this headline")

===========================================================

Installation[¶](#installation "Permalink to this headline")

-----------------------------------------------------------

`watchdog` requires Python 2.6 or above to work. If you are using a

Linux/FreeBSD/Mac OS X system, you already have Python installed. However,

you may wish to upgrade your system to Python 2.7 at least, because this

version comes with updates that can reduce compatibility

problems. See a list of [Dependencies](#installation-dependencies).

### Installing from PyPI using pip[¶](#installing-from-pypi-using-pip "Permalink to this headline")

```

$ pip install watchdog

```

### Installing from source tarballs[¶](#installing-from-source-tarballs "Permalink to this headline")

```

$ wget -c <http://pypi.python.org/packages/source/w/watchdog/watchdog>-0.9.0.tar.gz

$ tar zxvf watchdog-0.9.0.tar.gz

$ cd watchdog-0.9.0

$ python setup.py install

```

### Installing from the code repository[¶](#installing-from-the-code-repository "Permalink to this headline")

```

$ git clone --recursive git://github.com/gorakhargosh/watchdog.git

$ cd watchdog

$ python setup.py install

```

### Dependencies[¶](#dependencies "Permalink to this headline")

`watchdog` depends on many libraries to do its job. The following is

a list of dependencies you need based on the operating system you are

using.

| Operating system

Dependency (row) | Windows | Linux 2.6 | 

Mac OS X/

Darwin

 | BSD |

| --- | --- | --- | --- | --- |

| [XCode](http://developer.apple.com/technologies/tools/xcode.html) |  |  | Yes |  |

| [PyYAML](http://www.pyyaml.org/) | Yes | Yes | Yes | Yes |

| [argh](http://pypi.python.org/pypi/argh) | Yes | Yes | Yes | Yes |

| [argparse](http://pypi.python.org/pypi/argparse) | Yes | Yes | Yes | Yes |

| [select\_backport](http://pypi.python.org/pypi/select_backport/)

(Python 2.6) |  |  | Yes | Yes |

| [pathtools](http://github.com/gorakhargosh/pathtools) | Yes | Yes | Yes | Yes |

#### Installing Dependencies[¶](#installing-dependencies "Permalink to this headline")

The `watchmedo` script depends on [PyYAML](http://www.pyyaml.org/) which links with [LibYAML](http://pyyaml.org/wiki/LibYAML).

On Mac OS X, you can use [homebrew](http://mxcl.github.com/homebrew/) to install LibYAML:

```

brew install libyaml

```

On Linux, use your favorite package manager to install LibYAML. Here’s how you

do it on Ubuntu:

```

sudo aptitude install libyaml-dev

```

On Windows, please install [PyYAML](http://www.pyyaml.org/) using the binaries they provide.

### Supported Platforms (and Caveats)[¶](#supported-platforms-and-caveats "Permalink to this headline")

`watchdog` uses native APIs as much as possible falling back

to polling the disk periodically to compare directory snapshots

only when it cannot use an API natively-provided by the underlying

operating system. The following operating systems are currently

supported:

Warning

Differences between behaviors of these native API

are noted below.

Linux 2.6+

Linux kernel version 2.6 and later come with an API called [inotify](http://linux.die.net/man/7/inotify)

that programs can use to monitor file system events.

Note

On most systems the maximum number of watches that can be

created per user is limited to `8192`. `watchdog` needs one

per directory to monitor. To change this limit, edit

`/etc/sysctl.conf` and add:

```

fs.inotify.max\_user\_watches=16384

```

Mac OS X

The Darwin kernel/OS X API maintains two ways to monitor directories

for file system events:

* [kqueue](http://www.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2)

* [FSEvents](http://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/FSEvents_ProgGuide/Introduction/Introduction.html)

`watchdog` can use whichever one is available, preferring

FSEvents over `kqueue(2)`. `kqueue(2)` uses open file descriptors for monitoring

and the current implementation uses

[Mac OS X File System Monitoring Performance Guidelines](http://developer.apple.com/library/ios/#documentation/Performance/Conceptual/FileSystem/Articles/TrackingChanges.html) to open

these file descriptors only to monitor events, thus allowing

OS X to unmount volumes that are being watched without locking them.

Note

More information about how `watchdog` uses `kqueue(2)` is noted

in [BSD Unix variants](#bsd-unix-variants). Much of this information applies to

Mac OS X as well.

BSD Unix variants

BSD variants come with [kqueue](http://www.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2) which programs can use to monitor

changes to open file descriptors. Because of the way `kqueue(2)` works,

`watchdog` needs to open these files and directories in read-only

non-blocking mode and keep books about them.

`watchdog` will automatically open file descriptors for all

new files/directories created and close those for which are deleted.

Note

The maximum number of open file descriptor per process limit

on your operating system can hinder `watchdog`’s ability to

monitor files.

You should ensure this limit is set to at least **1024**

(or a value suitable to your usage). The following command

appended to your `~/.profile` configuration file does

this for you:

```

ulimit -n 1024

```

Windows Vista and later

The Windows API provides the [ReadDirectoryChangesW](http://msdn.microsoft.com/en-us/library/aa365465(VS.85).aspx). `watchdog`

currently contains implementation for a synchronous approach requiring

additional API functionality only available in Windows Vista and later.

Note

Since renaming is not the same operation as movement

on Windows, `watchdog` tries hard to convert renames to

movement events. Also, because the [ReadDirectoryChangesW](http://msdn.microsoft.com/en-us/library/aa365465(VS.85).aspx)

API function returns rename/movement events for directories

even before the underlying I/O is complete, `watchdog`

may not be able to completely scan the moved directory

in order to successfully queue movement events for

files and directories within it.

Note

Since the Windows API does not provide information about whether

an object is a file or a directory, delete events for directories

may be reported as a file deleted event.

OS Independent Polling

`watchdog` also includes a fallback-implementation that polls

watched directories for changes by periodically comparing snapshots

of the directory tree.

Quickstart[¶](#quickstart "Permalink to this headline")

-------------------------------------------------------

Below we present a simple example that monitors the current directory

recursively (which means, it will traverse any sub-directories)

to detect changes. Here is what we will do with the API:

1. Create an instance of the [`watchdog.observers.Observer`](index.html#watchdog.observers.Observer "watchdog.observers.Observer") thread class.

2. Implement a subclass of [`watchdog.events.FileSystemEventHandler`](index.html#watchdog.events.FileSystemEventHandler "watchdog.events.FileSystemEventHandler")

(or as in our case, we will use the built-in

[`watchdog.events.LoggingEventHandler`](index.html#watchdog.events.LoggingEventHandler "watchdog.events.LoggingEventHandler"), which already does).

3. Schedule monitoring a few paths with the observer instance

attaching the event handler.

4. Start the observer thread and wait for it generate events

without blocking our main thread.

By default, an [`watchdog.observers.Observer`](index.html#watchdog.observers.Observer "watchdog.observers.Observer") instance will not monitor

sub-directories. By passing `recursive=True` in the call to

`watchdog.observers.Observer.schedule()` monitoring

entire directory trees is ensured.

### A Simple Example[¶](#a-simple-example "Permalink to this headline")

The following example program will monitor the current directory recursively for

file system changes and simply log them to the console:

```

import sys

import logging

from watchdog.observers import Observer

from watchdog.events import LoggingEventHandler

if \_\_name\_\_ == "\_\_main\_\_":

    logging.basicConfig(level=logging.INFO,

                        format='%(asctime)s - %(message)s',

                        datefmt='%Y-%m-%d %H:%M:%S')

    path = sys.argv[1] if len(sys.argv) > 1 else '.'

    event\_handler = LoggingEventHandler()

    observer = Observer()

    observer.schedule(event\_handler, path, recursive=True)

    observer.start()

    try:

        while observer.isAlive():

            observer.join(1)

    except KeyboardInterrupt:

        observer.stop()

    observer.join()

```

To stop the program, press Control-C.

API Reference[¶](#api-reference "Permalink to this headline")

-------------------------------------------------------------

### watchdog.events[¶](#module-watchdog.events "Permalink to this headline")

| module: | watchdog.events |

| synopsis: | File system events and event handlers. |

| author: | [yesudeep@google.com](mailto:yesudeep%40google.com) (Yesudeep Mangalapilly) |

#### Event Classes[¶](#event-classes "Permalink to this headline")

*class* `watchdog.events.``FileSystemEvent`(*src\_path*)[[source]](_modules/watchdog/events.html#FileSystemEvent)[¶](#watchdog.events.FileSystemEvent "Permalink to this definition")

Bases: `object`

Immutable type that represents a file system event that is triggered

when a change occurs on the monitored file system.

All FileSystemEvent objects are required to be immutable and hence

can be used as keys in dictionaries or be added to sets.

`event_type` *= None*[¶](#watchdog.events.FileSystemEvent.event_type "Permalink to this definition")

The type of the event as a string.

`is_directory` *= False*[¶](#watchdog.events.FileSystemEvent.is_directory "Permalink to this definition")

True if event was emitted for a directory; False otherwise.

`src_path`[¶](#watchdog.events.FileSystemEvent.src_path "Permalink to this definition")

Source path of the file system object that triggered this event.

*class* `watchdog.events.``FileSystemMovedEvent`(*src\_path*, *dest\_path*)[[source]](_modules/watchdog/events.html#FileSystemMovedEvent)[¶](#watchdog.events.FileSystemMovedEvent "Permalink to this definition")

Bases: [`watchdog.events.FileSystemEvent`](#watchdog.events.FileSystemEvent "watchdog.events.FileSystemEvent")

File system event representing any kind of file system movement.

`dest_path`[¶](#watchdog.events.FileSystemMovedEvent.dest_path "Permalink to this definition")

The destination path of the move event.

*class* `watchdog.events.``FileMovedEvent`(*src\_path*, *dest\_path*)[[source]](_modules/watchdog/events.html#FileMovedEvent)[¶](#watchdog.events.FileMovedEvent "Permalink to this definition")

Bases: [`watchdog.events.FileSystemMovedEvent`](#watchdog.events.FileSystemMovedEvent "watchdog.events.FileSystemMovedEvent")

File system event representing file movement on the file system.

*class* `watchdog.events.``DirMovedEvent`(*src\_path*, *dest\_path*)[[source]](_modules/watchdog/events.html#DirMovedEvent)[¶](#watchdog.events.DirMovedEvent "Permalink to this definition")

Bases: [`watchdog.events.FileSystemMovedEvent`](#watchdog.events.FileSystemMovedEvent "watchdog.events.FileSystemMovedEvent")

File system event representing directory movement on the file system.

*class* `watchdog.events.``FileModifiedEvent`(*src\_path*)[[source]](_modules/watchdog/events.html#FileModifiedEvent)[¶](#watchdog.events.FileModifiedEvent "Permalink to this definition")

Bases: [`watchdog.events.FileSystemEvent`](#watchdog.events.FileSystemEvent "watchdog.events.FileSystemEvent")

File system event representing file modification on the file system.

*class* `watchdog.events.``DirModifiedEvent`(*src\_path*)[[source]](_modules/watchdog/events.html#DirModifiedEvent)[¶](#watchdog.events.DirModifiedEvent "Permalink to this definition")

Bases: [`watchdog.events.FileSystemEvent`](#watchdog.events.FileSystemEvent "watchdog.events.FileSystemEvent")

File system event representing directory modification on the file system.

*class* `watchdog.events.``FileCreatedEvent`(*src\_path*)[[source]](_modules/watchdog/events.html#FileCreatedEvent)[¶](#watchdog.events.FileCreatedEvent "Permalink to this definition")

Bases: [`watchdog.events.FileSystemEvent`](#watchdog.events.FileSystemEvent "watchdog.events.FileSystemEvent")

File system event representing file creation on the file system.

*class* `watchdog.events.``DirCreatedEvent`(*src\_path*)[[source]](_modules/watchdog/events.html#DirCreatedEvent)[¶](#watchdog.events.DirCreatedEvent "Permalink to this definition")

Bases: [`watchdog.events.FileSystemEvent`](#watchdog.events.FileSystemEvent "watchdog.events.FileSystemEvent")

File system event representing directory creation on the file system.

*class* `watchdog.events.``FileDeletedEvent`(*src\_path*)[[source]](_modules/watchdog/events.html#FileDeletedEvent)[¶](#watchdog.events.FileDeletedEvent "Permalink to this definition")

Bases: [`watchdog.events.FileSystemEvent`](#watchdog.events.FileSystemEvent "watchdog.events.FileSystemEvent")

File system event representing file deletion on the file system.

*class* `watchdog.events.``DirDeletedEvent`(*src\_path*)[[source]](_modules/watchdog/events.html#DirDeletedEvent)[¶](#watchdog.events.DirDeletedEvent "Permalink to this definition")

Bases: [`watchdog.events.FileSystemEvent`](#watchdog.events.FileSystemEvent "watchdog.events.FileSystemEvent")

File system event representing directory deletion on the file system.

#### Event Handler Classes[¶](#event-handler-classes "Permalink to this headline")

*class* `watchdog.events.``FileSystemEventHandler`[[source]](_modules/watchdog/events.html#FileSystemEventHandler)[¶](#watchdog.events.FileSystemEventHandler "Permalink to this definition")

Bases: `object`

Base file system event handler that you can override methods from.

`dispatch`(*event*)[[source]](_modules/watchdog/events.html#FileSystemEventHandler.dispatch)[¶](#watchdog.events.FileSystemEventHandler.dispatch "Permalink to this definition")

Dispatches events to the appropriate methods.

| Parameters: | **event** ([`FileSystemEvent`](#watchdog.events.FileSystemEvent "watchdog.events.FileSystemEvent")) – The event object representing the file system event. |

`on_any_event`(*event*)[[source]](_modules/watchdog/events.html#FileSystemEventHandler.on_any_event)[¶](#watchdog.events.FileSystemEventHandler.on_any_event "Permalink to this definition")

Catch-all event handler.

| Parameters: | **event** ([`FileSystemEvent`](#watchdog.events.FileSystemEvent "watchdog.events.FileSystemEvent")) – The event object representing the file system event. |

`on_created`(*event*)[[source]](_modules/watchdog/events.html#FileSystemEventHandler.on_created)[¶](#watchdog.events.FileSystemEventHandler.on_created "Permalink to this definition")

Called when a file or directory is created.

| Parameters: | **event** ([`DirCreatedEvent`](#watchdog.events.DirCreatedEvent "watchdog.events.DirCreatedEvent") or [`FileCreatedEvent`](#watchdog.events.FileCreatedEvent "watchdog.events.FileCreatedEvent")) – Event representing file/directory creation. |

`on_deleted`(*event*)[[source]](_modules/watchdog/events.html#FileSystemEventHandler.on_deleted)[¶](#watchdog.events.FileSystemEventHandler.on_deleted "Permalink to this definition")

Called when a file or directory is deleted.

| Parameters: | **event** ([`DirDeletedEvent`](#watchdog.events.DirDeletedEvent "watchdog.events.DirDeletedEvent") or [`FileDeletedEvent`](#watchdog.events.FileDeletedEvent "watchdog.events.FileDeletedEvent")) – Event representing file/directory deletion. |

`on_modified`(*event*)[[source]](_modules/watchdog/events.html#FileSystemEventHandler.on_modified)[¶](#watchdog.events.FileSystemEventHandler.on_modified "Permalink to this definition")

Called when a file or directory is modified.

| Parameters: | **event** ([`DirModifiedEvent`](#watchdog.events.DirModifiedEvent "watchdog.events.DirModifiedEvent") or [`FileModifiedEvent`](#watchdog.events.FileModifiedEvent "watchdog.events.FileModifiedEvent")) – Event representing file/directory modification. |

`on_moved`(*event*)[[source]](_modules/watchdog/events.html#FileSystemEventHandler.on_moved)[¶](#watchdog.events.FileSystemEventHandler.on_moved "Permalink to this definition")

Called when a file or a directory is moved or renamed.

| Parameters: | **event** ([`DirMovedEvent`](#watchdog.events.DirMovedEvent "watchdog.events.DirMovedEvent") or [`FileMovedEvent`](#watchdog.events.FileMovedEvent "watchdog.events.FileMovedEvent")) – Event representing file/directory movement. |

*class* `watchdog.events.``PatternMatchingEventHandler`(*patterns=None*, *ignore\_patterns=None*, *ignore\_directories=False*, *case\_sensitive=False*)[[source]](_modules/watchdog/events.html#PatternMatchingEventHandler)[¶](#watchdog.events.PatternMatchingEventHandler "Permalink to this definition")

Bases: [`watchdog.events.FileSystemEventHandler`](#watchdog.events.FileSystemEventHandler "watchdog.events.FileSystemEventHandler")

Matches given patterns with file paths associated with occurring events.

`case_sensitive`[¶](#watchdog.events.PatternMatchingEventHandler.case_sensitive "Permalink to this definition")

(Read-only)

`True` if path names should be matched sensitive to case; `False`

otherwise.

`dispatch`(*event*)[[source]](_modules/watchdog/events.html#PatternMatchingEventHandler.dispatch)[¶](#watchdog.events.PatternMatchingEventHandler.dispatch "Permalink to this definition")

Dispatches events to the appropriate methods.

| Parameters: | **event** ([`FileSystemEvent`](#watchdog.events.FileSystemEvent "watchdog.events.FileSystemEvent")) – The event object representing the file system event. |

`ignore_directories`[¶](#watchdog.events.PatternMatchingEventHandler.ignore_directories "Permalink to this definition")

(Read-only)

`True` if directories should be ignored; `False` otherwise.

`ignore_patterns`[¶](#watchdog.events.PatternMatchingEventHandler.ignore_patterns "Permalink to this definition")

(Read-only)

Patterns to ignore matching event paths.

`patterns`[¶](#watchdog.events.PatternMatchingEventHandler.patterns "Permalink to this definition")

(Read-only)

Patterns to allow matching event paths.

*class* `watchdog.events.``RegexMatchingEventHandler`(*regexes=['.\*'], ignore\_regexes=[], ignore\_directories=False, case\_sensitive=False*)[[source]](_modules/watchdog/events.html#RegexMatchingEventHandler)[¶](#watchdog.events.RegexMatchingEventHandler "Permalink to this definition")

Bases: [`watchdog.events.FileSystemEventHandler`](#watchdog.events.FileSystemEventHandler "watchdog.events.FileSystemEventHandler")

Matches given regexes with file paths associated with occurring events.

`case_sensitive`[¶](#watchdog.events.RegexMatchingEventHandler.case_sensitive "Permalink to this definition")

(Read-only)

`True` if path names should be matched sensitive to case; `False`

otherwise.

`dispatch`(*event*)[[source]](_modules/watchdog/events.html#RegexMatchingEventHandler.dispatch)[¶](#watchdog.events.RegexMatchingEventHandler.dispatch "Permalink to this definition")

Dispatches events to the appropriate methods.

| Parameters: | **event** ([`FileSystemEvent`](#watchdog.events.FileSystemEvent "watchdog.events.FileSystemEvent")) – The event object representing the file system event. |

`ignore_directories`[¶](#watchdog.events.RegexMatchingEventHandler.ignore_directories "Permalink to this definition")

(Read-only)

`True` if directories should be ignored; `False` otherwise.

`ignore_regexes`[¶](#watchdog.events.RegexMatchingEventHandler.ignore_regexes "Permalink to this definition")

(Read-only)

Regexes to ignore matching event paths.

`regexes`[¶](#watchdog.events.RegexMatchingEventHandler.regexes "Permalink to this definition")

(Read-only)

Regexes to allow matching event paths.

*class* `watchdog.events.``LoggingEventHandler`[[source]](_modules/watchdog/events.html#LoggingEventHandler)[¶](#watchdog.events.LoggingEventHandler "Permalink to this definition")

Bases: [`watchdog.events.FileSystemEventHandler`](#watchdog.events.FileSystemEventHandler "watchdog.events.FileSystemEventHandler")

Logs all the events captured.

`on_created`(*event*)[[source]](_modules/watchdog/events.html#LoggingEventHandler.on_created)[¶](#watchdog.events.LoggingEventHandler.on_created "Permalink to this definition")

Called when a file or directory is created.

| Parameters: | **event** ([`DirCreatedEvent`](#watchdog.events.DirCreatedEvent "watchdog.events.DirCreatedEvent") or [`FileCreatedEvent`](#watchdog.events.FileCreatedEvent "watchdog.events.FileCreatedEvent")) – Event representing file/directory creation. |

`on_deleted`(*event*)[[source]](_modules/watchdog/events.html#LoggingEventHandler.on_deleted)[¶](#watchdog.events.LoggingEventHandler.on_deleted "Permalink to this definition")

Called when a file or directory is deleted.

| Parameters: | **event** ([`DirDeletedEvent`](#watchdog.events.DirDeletedEvent "watchdog.events.DirDeletedEvent") or [`FileDeletedEvent`](#watchdog.events.FileDeletedEvent "watchdog.events.FileDeletedEvent")) – Event representing file/directory deletion. |

`on_modified`(*event*)[[source]](_modules/watchdog/events.html#LoggingEventHandler.on_modified)[¶](#watchdog.events.LoggingEventHandler.on_modified "Permalink to this definition")

Called when a file or directory is modified.

| Parameters: | **event** ([`DirModifiedEvent`](#watchdog.events.DirModifiedEvent "watchdog.events.DirModifiedEvent") or [`FileModifiedEvent`](#watchdog.events.FileModifiedEvent "watchdog.events.FileModifiedEvent")) – Event representing file/directory modification. |

`on_moved`(*event*)[[source]](_modules/watchdog/events.html#LoggingEventHandler.on_moved)[¶](#watchdog.events.LoggingEventHandler.on_moved "Permalink to this definition")

Called when a file or a directory is moved or renamed.

| Parameters: | **event** ([`DirMovedEvent`](#watchdog.events.DirMovedEvent "watchdog.events.DirMovedEvent") or [`FileMovedEvent`](#watchdog.events.FileMovedEvent "watchdog.events.FileMovedEvent")) – Event representing file/directory movement. |

### watchdog.observers.api[¶](#module-watchdog.observers.api "Permalink to this headline")

#### Immutables[¶](#immutables "Permalink to this headline")

*class* `watchdog.observers.api.``ObservedWatch`(*path*, *recursive*)[[source]](_modules/watchdog/observers/api.html#ObservedWatch)[¶](#watchdog.observers.api.ObservedWatch "Permalink to this definition")

Bases: `object`

An scheduled watch.

| Parameters: | * **path** – Path string.

* **recursive** – `True` if watch is recursive; `False` otherwise.

 |

`is_recursive`[¶](#watchdog.observers.api.ObservedWatch.is_recursive "Permalink to this definition")

Determines whether subdirectories are watched for the path.

`path`[¶](#watchdog.observers.api.ObservedWatch.path "Permalink to this definition")

The path that this watch monitors.

#### Collections[¶](#collections "Permalink to this headline")

*class* `watchdog.observers.api.``EventQueue`(*maxsize=0*)[[source]](_modules/watchdog/observers/api.html#EventQueue)[¶](#watchdog.observers.api.EventQueue "Permalink to this definition")

Bases: `watchdog.utils.bricks.SkipRepeatsQueue`

Thread-safe event queue based on a special queue that skips adding

the same event (`FileSystemEvent`) multiple times consecutively.

Thus avoiding dispatching multiple event handling

calls when multiple identical events are produced quicker than an observer

can consume them.

#### Classes[¶](#classes "Permalink to this headline")

*class* `watchdog.observers.api.``EventEmitter`(*event\_queue*, *watch*, *timeout=1*)[[source]](_modules/watchdog/observers/api.html#EventEmitter)[¶](#watchdog.observers.api.EventEmitter "Permalink to this definition")

Bases: [`watchdog.utils.BaseThread`](#watchdog.utils.BaseThread "watchdog.utils.BaseThread")

Producer thread base class subclassed by event emitters

that generate events and populate a queue with them.

| Parameters: | * **event\_queue** (`watchdog.events.EventQueue`) – The event queue to populate with generated events.

* **watch** ([`ObservedWatch`](#watchdog.observers.api.ObservedWatch "watchdog.observers.api.ObservedWatch")) – The watch to observe and produce events for.

* **timeout** (`float`) – Timeout (in seconds) between successive attempts at reading events.

 |

`queue_event`(*event*)[[source]](_modules/watchdog/observers/api.html#EventEmitter.queue_event)[¶](#watchdog.observers.api.EventEmitter.queue_event "Permalink to this definition")

Queues a single event.

| Parameters: | **event** (An instance of [`watchdog.events.FileSystemEvent`](#watchdog.events.FileSystemEvent "watchdog.events.FileSystemEvent")

or a subclass.) – Event to be queued. |

`queue_events`(*timeout*)[[source]](_modules/watchdog/observers/api.html#EventEmitter.queue_events)[¶](#watchdog.observers.api.EventEmitter.queue_events "Permalink to this definition")

Override this method to populate the event queue with events

per interval period.

| Parameters: | **timeout** (`float`) – Timeout (in seconds) between successive attempts at

reading events. |

`run`()[[source]](_modules/watchdog/observers/api.html#EventEmitter.run)[¶](#watchdog.observers.api.EventEmitter.run "Permalink to this definition")

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method

invokes the callable object passed to the object’s constructor as the

target argument, if any, with sequential and keyword arguments taken

from the args and kwargs arguments, respectively.

`timeout`[¶](#watchdog.observers.api.EventEmitter.timeout "Permalink to this definition")

Blocking timeout for reading events.

`watch`[¶](#watchdog.observers.api.EventEmitter.watch "Permalink to this definition")

The watch associated with this emitter.

*class* `watchdog.observers.api.``EventDispatcher`(*timeout=1*)[[source]](_modules/watchdog/observers/api.html#EventDispatcher)[¶](#watchdog.observers.api.EventDispatcher "Permalink to this definition")

Bases: [`watchdog.utils.BaseThread`](#watchdog.utils.BaseThread "watchdog.utils.BaseThread")

Consumer thread base class subclassed by event observer threads

that dispatch events from an event queue to appropriate event handlers.

| Parameters: | **timeout** (`float`) – Event queue blocking timeout (in seconds). |

`dispatch_events`(*event\_queue*, *timeout*)[[source]](_modules/watchdog/observers/api.html#EventDispatcher.dispatch_events)[¶](#watchdog.observers.api.EventDispatcher.dispatch_events "Permalink to this definition")

Override this method to consume events from an event queue, blocking

on the queue for the specified timeout before raising `queue.Empty`.

| Parameters: | * **event\_queue** ([`EventQueue`](#watchdog.observers.api.EventQueue "watchdog.observers.api.EventQueue")) – Event queue to populate with one set of events.

* **timeout** (`float`) – Interval period (in seconds) to wait before timing out on the

event queue.

 |

| Raises: | `queue.Empty` |

`event_queue`[¶](#watchdog.observers.api.EventDispatcher.event_queue "Permalink to this definition")

The event queue which is populated with file system events

by emitters and from which events are dispatched by a dispatcher

thread.

`run`()[[source]](_modules/watchdog/observers/api.html#EventDispatcher.run)[¶](#watchdog.observers.api.EventDispatcher.run "Permalink to this definition")

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method

invokes the callable object passed to the object’s constructor as the

target argument, if any, with sequential and keyword arguments taken

from the args and kwargs arguments, respectively.

`timeout`[¶](#watchdog.observers.api.EventDispatcher.timeout "Permalink to this definition")

Event queue block timeout.

*class* `watchdog.observers.api.``BaseObserver`(*emitter\_class*, *timeout=1*)[[source]](_modules/watchdog/observers/api.html#BaseObserver)[¶](#watchdog.observers.api.BaseObserver "Permalink to this definition")

Bases: [`watchdog.observers.api.EventDispatcher`](#watchdog.observers.api.EventDispatcher "watchdog.observers.api.EventDispatcher")

Base observer.

`add_handler_for_watch`(*event\_handler*, *watch*)[[source]](_modules/watchdog/observers/api.html#BaseObserver.add_handler_for_watch)[¶](#watchdog.observers.api.BaseObserver.add_handler_for_watch "Permalink to this definition")

Adds a handler for the given watch.

| Parameters: | * **event\_handler** ([`watchdog.events.FileSystemEventHandler`](#watchdog.events.FileSystemEventHandler "watchdog.events.FileSystemEventHandler") or a subclass) – An event handler instance that has appropriate event handling

methods which will be called by the observer in response to

file system events.

* **watch** (An instance of [`ObservedWatch`](#watchdog.observers.api.ObservedWatch "watchdog.observers.api.ObservedWatch") or a subclass of

[`ObservedWatch`](#watchdog.observers.api.ObservedWatch "watchdog.observers.api.ObservedWatch")) – The watch to add a handler for.

 |

`dispatch_events`(*event\_queue*, *timeout*)[[source]](_modules/watchdog/observers/api.html#BaseObserver.dispatch_events)[¶](#watchdog.observers.api.BaseObserver.dispatch_events "Permalink to this definition")

Override this method to consume events from an event queue, blocking

on the queue for the specified timeout before raising `queue.Empty`.

| Parameters: | * **event\_queue** ([`EventQueue`](#watchdog.observers.api.EventQueue "watchdog.observers.api.EventQueue")) – Event queue to populate with one set of events.

* **timeout** (`float`) – Interval period (in seconds) to wait before timing out on the

event queue.

 |

| Raises: | `queue.Empty` |

`emitters`[¶](#watchdog.observers.api.BaseObserver.emitters "Permalink to this definition")

Returns event emitter created by this observer.

`on_thread_stop`()[[source]](_modules/watchdog/observers/api.html#BaseObserver.on_thread_stop)[¶](#watchdog.observers.api.BaseObserver.on_thread_stop "Permalink to this definition")

Override this method instead of `stop()`.

`stop()` calls this method.

This method is called immediately after the thread is signaled to stop.

`remove_handler_for_watch`(*event\_handler*, *watch*)[[source]](_modules/watchdog/observers/api.html#BaseObserver.remove_handler_for_watch)[¶](#watchdog.observers.api.BaseObserver.remove_handler_for_watch "Permalink to this definition")

Removes a handler for the given watch.

| Parameters: | * **event\_handler** ([`watchdog.events.FileSystemEventHandler`](#watchdog.events.FileSystemEventHandler "watchdog.events.FileSystemEventHandler") or a subclass) – An event handler instance that has appropriate event handling

methods which will be called by the observer in response to

file system events.

* **watch** (An instance of [`ObservedWatch`](#watchdog.observers.api.ObservedWatch "watchdog.observers.api.ObservedWatch") or a subclass of

[`ObservedWatch`](#watchdog.observers.api.ObservedWatch "watchdog.observers.api.ObservedWatch")) – The watch to remove a handler for.

 |

`schedule`(*event\_handler*, *path*, *recursive=False*)[[source]](_modules/watchdog/observers/api.html#BaseObserver.schedule)[¶](#watchdog.observers.api.BaseObserver.schedule "Permalink to this definition")

Schedules watching a path and calls appropriate methods specified

in the given event handler in response to file system events.

| Parameters: | * **event\_handler** ([`watchdog.events.FileSystemEventHandler`](#watchdog.events.FileSystemEventHandler "watchdog.events.FileSystemEventHandler") or a subclass) – An event handler instance that has appropriate event handling

methods which will be called by the observer in response to

file system events.

* **path** (`str`) – Directory path that will be monitored.

* **recursive** (`bool`) – `True` if events will be emitted for sub-directories

traversed recursively; `False` otherwise.

 |

| Returns: | An [`ObservedWatch`](#watchdog.observers.api.ObservedWatch "watchdog.observers.api.ObservedWatch") object instance representing

a watch. |

`start`()[[source]](_modules/watchdog/observers/api.html#BaseObserver.start)[¶](#watchdog.observers.api.BaseObserver.start "Permalink to this definition")

Start the thread’s activity.

It must be called at most once per thread object. It arranges for the

object’s run() method to be invoked in a separate thread of control.

This method will raise a RuntimeError if called more than once on the

same thread object.

`unschedule`(*watch*)[[source]](_modules/watchdog/observers/api.html#BaseObserver.unschedule)[¶](#watchdog.observers.api.BaseObserver.unschedule "Permalink to this definition")

Unschedules a watch.

| Parameters: | **watch** (An instance of [`ObservedWatch`](#watchdog.observers.api.ObservedWatch "watchdog.observers.api.ObservedWatch") or a subclass of

[`ObservedWatch`](#watchdog.observers.api.ObservedWatch "watchdog.observers.api.ObservedWatch")) – The watch to unschedule. |

`unschedule_all`()[[source]](_modules/watchdog/observers/api.html#BaseObserver.unschedule_all)[¶](#watchdog.observers.api.BaseObserver.unschedule_all "Permalink to this definition")

Unschedules all watches and detaches all associated event

handlers.

### watchdog.observers[¶](#module-watchdog.observers "Permalink to this headline")

| module: | watchdog.observers |

| synopsis: | Observer that picks a native implementation if available. |

| author: | [yesudeep@google.com](mailto:yesudeep%40google.com) (Yesudeep Mangalapilly) |

#### Classes[¶](#id1 "Permalink to this headline")

`watchdog.observers.``Observer`[¶](#watchdog.observers.Observer "Permalink to this definition")

alias of `watchdog.observers.inotify.InotifyObserver`

Observer thread that schedules watching directories and dispatches

calls to event handlers.

You can also import platform specific classes directly and use it instead

of [`Observer`](#watchdog.observers.Observer "watchdog.observers.Observer"). Here is a list of implemented observer classes.:

| Class | Platforms | Note |

| --- | --- | --- |

| `inotify.InotifyObserver` | Linux 2.6.13+ | `inotify(7)` based observer |

| `fsevents.FSEventsObserver` | Mac OS X | FSEvents based observer |

| `kqueue.KqueueObserver` | Mac OS X and BSD with kqueue(2) | `kqueue(2)` based observer |

| `read\_directory\_changes.WindowsApiObserver` | MS Windows | Windows API-based observer |

| [`polling.PollingObserver`](#watchdog.observers.polling.PollingObserver "watchdog.observers.polling.PollingObserver") | Any | fallback implementation |

### watchdog.observers.polling[¶](#module-watchdog.observers.polling "Permalink to this headline")

| module: | watchdog.observers.polling |

| synopsis: | Polling emitter implementation. |

| author: | [yesudeep@google.com](mailto:yesudeep%40google.com) (Yesudeep Mangalapilly) |

#### Classes[¶](#id2 "Permalink to this headline")

*class* `watchdog.observers.polling.``PollingObserver`(*timeout=1*)[[source]](_modules/watchdog/observers/polling.html#PollingObserver)[¶](#watchdog.observers.polling.PollingObserver "Permalink to this definition")

Bases: [`watchdog.observers.api.BaseObserver`](#watchdog.observers.api.BaseObserver "watchdog.observers.api.BaseObserver")

Platform-independent observer that polls a directory to detect file

system changes.

*class* `watchdog.observers.polling.``PollingObserverVFS`(*stat*, *listdir*, *polling\_interval=1*)[[source]](_modules/watchdog/observers/polling.html#PollingObserverVFS)[¶](#watchdog.observers.polling.PollingObserverVFS "Permalink to this definition")

Bases: [`watchdog.observers.api.BaseObserver`](#watchdog.observers.api.BaseObserver "watchdog.observers.api.BaseObserver")

File system independent observer that polls a directory to detect changes.

`__init__`(*stat*, *listdir*, *polling\_interval=1*)[[source]](_modules/watchdog/observers/polling.html#PollingObserverVFS.__init__)[¶](#watchdog.observers.polling.PollingObserverVFS.__init__ "Permalink to this definition")

| Parameters: | * **stat** – stat function. See `os.stat` for details.

* **listdir** – listdir function. See `os.listdir` for details.

* **polling\_interval** (*float*) – interval in seconds between polling the file system.

 |

### watchdog.utils[¶](#module-watchdog.utils "Permalink to this headline")

| module: | watchdog.utils |

| synopsis: | Utility classes and functions. |

| author: | [yesudeep@google.com](mailto:yesudeep%40google.com) (Yesudeep Mangalapilly) |

#### Classes[¶](#id3 "Permalink to this headline")

*class* `watchdog.utils.``BaseThread`[[source]](_modules/watchdog/utils.html#BaseThread)[¶](#watchdog.utils.BaseThread "Permalink to this definition")

Bases: `threading.Thread`

Convenience class for creating stoppable threads.

`daemon`[¶](#watchdog.utils.BaseThread.daemon "Permalink to this definition")

A boolean value indicating whether this thread is a daemon thread (True) or not (False).

This must be set before start() is called, otherwise RuntimeError is

raised. Its initial value is inherited from the creating thread; the

main thread is not a daemon thread and therefore all threads created in

the main thread default to daemon = False.

The entire Python program exits when no alive non-daemon threads are

left.

`ident`[¶](#watchdog.utils.BaseThread.ident "Permalink to this definition")

Thread identifier of this thread or None if it has not been started.

This is a nonzero integer. See the thread.get\_ident() function. Thread

identifiers may be recycled when a thread exits and another thread is

created. The identifier is available even after the thread has exited.

`isAlive`()[¶](#watchdog.utils.BaseThread.isAlive "Permalink to this definition")

Return whether the thread is alive.

This method returns True just before the run() method starts until just

after the run() method terminates. The module function enumerate()

returns a list of all alive threads.

`is_alive`()[¶](#watchdog.utils.BaseThread.is_alive "Permalink to this definition")

Return whether the thread is alive.

This method returns True just before the run() method starts until just

after the run() method terminates. The module function enumerate()

returns a list of all alive threads.

`join`(*timeout=None*)[¶](#watchdog.utils.BaseThread.join "Permalink to this definition")

Wait until the thread terminates.

This blocks the calling thread until the thread whose join() method is

called terminates – either normally or through an unhandled exception

or until the optional timeout occurs.

When the timeout argument is present and not None, it should be a

floating point number specifying a timeout for the operation in seconds

(or fractions thereof). As join() always returns None, you must call

isAlive() after join() to decide whether a timeout happened – if the

thread is still alive, the join() call timed out.

When the timeout argument is not present or None, the operation will

block until the thread terminates.

A thread can be join()ed many times.

join() raises a RuntimeError if an attempt is made to join the current

thread as that would cause a deadlock. It is also an error to join() a

thread before it has been started and attempts to do so raises the same

exception.

`name`[¶](#watchdog.utils.BaseThread.name "Permalink to this definition")

A string used for identification purposes only.

It has no semantics. Multiple threads may be given the same name. The

initial name is set by the constructor.

`on_thread_start`()[[source]](_modules/watchdog/utils.html#BaseThread.on_thread_start)[¶](#watchdog.utils.BaseThread.on_thread_start "Permalink to this definition")

Override this method instead of [`start()`](#watchdog.utils.BaseThread.start "watchdog.utils.BaseThread.start"). [`start()`](#watchdog.utils.BaseThread.start "watchdog.utils.BaseThread.start")

calls this method.

This method is called right before this thread is started and this

object’s run() method is invoked.

`on_thread_stop`()[[source]](_modules/watchdog/utils.html#BaseThread.on_thread_stop)[¶](#watchdog.utils.BaseThread.on_thread_stop "Permalink to this definition")

Override this method instead of [`stop()`](#watchdog.utils.BaseThread.stop "watchdog.utils.BaseThread.stop").

[`stop()`](#watchdog.utils.BaseThread.stop "watchdog.utils.BaseThread.stop") calls this method.

This method is called immediately after the thread is signaled to stop.

`run`()[¶](#watchdog.utils.BaseThread.run "Permalink to this definition")

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method

invokes the callable object passed to the object’s constructor as the

target argument, if any, with sequential and keyword arguments taken

from the args and kwargs arguments, respectively.

`should_keep_running`()[[source]](_modules/watchdog/utils.html#BaseThread.should_keep_running)[¶](#watchdog.utils.BaseThread.should_keep_running "Permalink to this definition")

Determines whether the thread should continue running.

`start`()[[source]](_modules/watchdog/utils.html#BaseThread.start)[¶](#watchdog.utils.BaseThread.start "Permalink to this definition")

Start the thread’s activity.

It must be called at most once per thread object. It arranges for the

object’s run() method to be invoked in a separate thread of control.

This method will raise a RuntimeError if called more than once on the

same thread object.

`stop`()[[source]](_modules/watchdog/utils.html#BaseThread.stop)[¶](#watchdog.utils.BaseThread.stop "Permalink to this definition")

Signals the thread to stop.

### watchdog.utils.dirsnapshot[¶](#module-watchdog.utils.dirsnapshot "Permalink to this headline")

| module: | watchdog.utils.dirsnapshot |

| synopsis: | Directory snapshots and comparison. |

| author: | [yesudeep@google.com](mailto:yesudeep%40google.com) (Yesudeep Mangalapilly) |

Where are the moved events? They “disappeared”

This implementation does not take partition boundaries

into consideration. It will only work when the directory

tree is entirely on the same file system. More specifically,

any part of the code that depends on inode numbers can

break if partition boundaries are crossed. In these cases,

the snapshot diff will represent file/directory movement as

created and deleted events.

#### Classes[¶](#id4 "Permalink to this headline")

*class* `watchdog.utils.dirsnapshot.``DirectorySnapshot`(*path*, *recursive=True*, *walker\_callback=<function <lambda>>*, *stat=<built-in function stat>*, *listdir=<built-in function listdir>*)[[source]](_modules/watchdog/utils/dirsnapshot.html#DirectorySnapshot)[¶](#watchdog.utils.dirsnapshot.DirectorySnapshot "Permalink to this definition")

Bases: `object`

A snapshot of stat information of files in a directory.

| Parameters: | * **path** (`str`) – The directory path for which a snapshot should be taken.

* **recursive** (`bool`) – `True` if the entire directory tree should be included in the

snapshot; `False` otherwise.

* **walker\_callback** – 

Deprecated since version 0.7.2.

* **stat** – Use custom stat function that returns a stat structure for path.

Currently only st\_dev, st\_ino, st\_mode and st\_mtime are needed.

A function with the signature `walker\_callback(path, stat\_info)`

which will be called for every entry in the directory tree.

* **listdir** – Use custom listdir function. See `os.listdir` for details.

 |

`inode`(*path*)[[source]](_modules/watchdog/utils/dirsnapshot.html#DirectorySnapshot.inode)[¶](#watchdog.utils.dirsnapshot.DirectorySnapshot.inode "Permalink to this definition")

Returns an id for path.

`path`(*id*)[[source]](_modules/watchdog/utils/dirsnapshot.html#DirectorySnapshot.path)[¶](#watchdog.utils.dirsnapshot.DirectorySnapshot.path "Permalink to this definition")

Returns path for id. None if id is unknown to this snapshot.

`paths`[¶](#watchdog.utils.dirsnapshot.DirectorySnapshot.paths "Permalink to this definition")

Set of file/directory paths in the snapshot.

`stat_info`(*path*)[[source]](_modules/watchdog/utils/dirsnapshot.html#DirectorySnapshot.stat_info)[¶](#watchdog.utils.dirsnapshot.DirectorySnapshot.stat_info "Permalink to this definition")

Returns a stat information object for the specified path from

the snapshot.

Attached information is subject to change. Do not use unless

you specify stat in constructor. Use [`inode()`](#watchdog.utils.dirsnapshot.DirectorySnapshot.inode "watchdog.utils.dirsnapshot.DirectorySnapshot.inode"), `mtime()`,

`isdir()` instead.

| Parameters: | **path** – The path for which stat information should be obtained

from a snapshot. |

*class* `watchdog.utils.dirsnapshot.``DirectorySnapshotDiff`(*ref*, *snapshot*)[[source]](_modules/watchdog/utils/dirsnapshot.html#DirectorySnapshotDiff)[¶](#watchdog.utils.dirsnapshot.DirectorySnapshotDiff "Permalink to this definition")

Bases: `object`

Compares two directory snapshots and creates an object that represents

the difference between the two snapshots.

| Parameters: | * **ref** ([`DirectorySnapshot`](#watchdog.utils.dirsnapshot.DirectorySnapshot "watchdog.utils.dirsnapshot.DirectorySnapshot")) – The reference directory snapshot.

* **snapshot** ([`DirectorySnapshot`](#watchdog.utils.dirsnapshot.DirectorySnapshot "watchdog.utils.dirsnapshot.DirectorySnapshot")) – The directory snapshot which will be compared

with the reference snapshot.

 |

`dirs_created`[¶](#watchdog.utils.dirsnapshot.DirectorySnapshotDiff.dirs_created "Permalink to this definition")

List of directories that were created.

`dirs_deleted`[¶](#watchdog.utils.dirsnapshot.DirectorySnapshotDiff.dirs_deleted "Permalink to this definition")

List of directories that were deleted.

`dirs_modified`[¶](#watchdog.utils.dirsnapshot.DirectorySnapshotDiff.dirs_modified "Permalink to this definition")

List of directories that were modified.

`dirs_moved`[¶](#watchdog.utils.dirsnapshot.DirectorySnapshotDiff.dirs_moved "Permalink to this definition")

List of directories that were moved.

Each event is a two-tuple the first item of which is the path

that has been renamed to the second item in the tuple.

`files_created`[¶](#watchdog.utils.dirsnapshot.DirectorySnapshotDiff.files_created "Permalink to this definition")

List of files that were created.

`files_deleted`[¶](#watchdog.utils.dirsnapshot.DirectorySnapshotDiff.files_deleted "Permalink to this definition")

List of files that were deleted.

`files_modified`[¶](#watchdog.utils.dirsnapshot.DirectorySnapshotDiff.files_modified "Permalink to this definition")

List of files that were modified.

`files_moved`[¶](#watchdog.utils.dirsnapshot.DirectorySnapshotDiff.files_moved "Permalink to this definition")

List of files that were moved.

Each event is a two-tuple the first item of which is the path

that has been renamed to the second item in the tuple.

Contributing[¶](#contributing "Permalink to this headline")

-----------------------------------------------------------

Welcome hacker! So you have got something you would like to see in

`watchdog`? Whee. This document will help you get started.

### Important URLs[¶](#important-urls "Permalink to this headline")

`watchdog` uses [git](http://git-scm.org/) to track code history and hosts its [code repository](http://github.com/gorakhargosh/watchdog)

at [github](http://github.com/). The [issue tracker](http://github.com/gorakhargosh/watchdog/issues) is where you can file bug reports and request

features or enhancements to `watchdog`.

### Before you start[¶](#before-you-start "Permalink to this headline")

Ensure your system has the following programs and libraries installed before

beginning to hack:

1. [Python](http://python.org)

2. [git](http://git-scm.org/)

3. ssh

4. [XCode](http://developer.apple.com/technologies/tools/xcode.html) (on Mac OS X)

5. [select\_backport](http://pypi.python.org/pypi/select_backport/) (on BSD/Mac OS X if you’re using Python 2.6)

### Setting up the Work Environment[¶](#setting-up-the-work-environment "Permalink to this headline")

`watchdog` makes extensive use of [zc.buildout](http://www.buildout.org/) to set up its work

environment. You should get familiar with it.

Steps to setting up a clean environment:

1. Fork the [code repository](http://github.com/gorakhargosh/watchdog) into your [github](http://github.com/) account. Let us call you

`hackeratti` for the sake of this example. Replace `hackeratti`

with your own username below.

2. Clone your fork and setup your environment:

```

$ git clone --recursive git@github.com:hackeratti/watchdog.git

$ cd watchdog

$ python tools/bootstrap.py --distribute

$ bin/buildout

```

Important

Re-run `bin/buildout` every time you make a change to the

`buildout.cfg` file.

That’s it with the setup. Now you’re ready to hack on `watchdog`.

### Enabling Continuous Integration[¶](#enabling-continuous-integration "Permalink to this headline")

The repository checkout contains a script called `autobuild.sh`

which you must run prior to making changes. It will detect changes to

Python source code or restructuredText documentation files anywhere

in the directory tree and rebuild [sphinx](http://sphinx.pocoo.org/) documentation, run all tests using

[nose](http://nose.readthedocs.org/en/latest/), and generate [coverage](http://nedbatchelder.com/code/coverage/) reports.

Start it by issuing this command in the `watchdog` directory

checked out earlier:

```

$ tools/autobuild.sh

...

```

Happy hacking!

Contribute[¶](#contribute "Permalink to this headline")

=======================================================

Found a bug in or want a feature added to `watchdog`?

You can fork the official [code repository](http://github.com/gorakhargosh/watchdog) or file an issue ticket

at the [issue tracker](http://github.com/gorakhargosh/watchdog/issues). You can also ask questions at the official

[mailing list](http://groups.google.com/group/watchdog-python). You may also want to refer to [Contributing](index.html#hacking) for information

about contributing code or documentation to `watchdog`.

Indices and tables[¶](#indices-and-tables "Permalink to this headline")

=======================================================================

* [Index](genindex.html)

* [Module Index](py-modindex.html)

* [Search Page](search.html)

### [Table of Contents](index.html#document-index)

* [Installation](index.html#document-installation)

	+ [Installing from PyPI using pip](index.html#installing-from-pypi-using-pip)

	+ [Installing from source tarballs](index.html#installing-from-source-tarballs)

	+ [Installing from the code repository](index.html#installing-from-the-code-repository)

	+ [Dependencies](index.html#dependencies)

	+ [Supported Platforms (and Caveats)](index.html#supported-platforms-and-caveats)

* [Quickstart](index.html#document-quickstart)

	+ [A Simple Example](index.html#a-simple-example)

* [API Reference](index.html#document-api)

	+ [watchdog.events](index.html#module-watchdog.events)

	+ [watchdog.observers.api](index.html#module-watchdog.observers.api)

	+ [watchdog.observers](index.html#module-watchdog.observers)

	+ [watchdog.observers.polling](index.html#module-watchdog.observers.polling)

	+ [watchdog.utils](index.html#module-watchdog.utils)

	+ [watchdog.utils.dirsnapshot](index.html#module-watchdog.utils.dirsnapshot)

* [Contributing](index.html#document-hacking)

	+ [Important URLs](index.html#important-urls)

	+ [Before you start](index.html#before-you-start)

	+ [Setting up the Work Environment](index.html#setting-up-the-work-environment)

	+ [Enabling Continuous Integration](index.html#enabling-continuous-integration)

### Quick search

### Navigation

* [watchdog 0.9.0 documentation](index.html#document-index) »

 © Copyright 2010, Yesudeep Mangalapilly.

 Created using [Sphinx](http://sphinx-doc.org/) 1.8.5.

 

