Skip to main content

Python utility to watch the file modification only.

Project description

forthebadge

Build Status Coverage Status

๐Ÿ“„ Overview

Python utility to watch the file modification. There are similar libraries: pyinotify, watchdog. These libraries watch the file system event, but JustWatch is supported modification only.

โœ๏ธ Usage

quick start

First of all, import classes from justwatch:

from justwatch import WatchManager, Observer

make WatchManager instance and add file or directory:

manager = WatchManager()
manager.add_file("./README.md")
manager.add_dir("./tests")

make Observer instance and set callback:

observer = Observer(manager)

@observer.set_callback
def callback(item):
    print "Catch the modification of '{0}'".format(item.path)

and run observer.watch

observer.watch()

example

๐Ÿ“ฅ Installation

$ git clone git@github.com:alice1017/JustWatch.git
$ cd JustWatch
$ python setup.py build install

TODO: I will upload pypi registry.

๐Ÿ‘€ Contribution

  1. Forks on Github
  2. Find a bug? Send a pull request to get it merged and published.

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
just_watch-1.0.0b1-py2.7.egg (7.0 kB) Copy SHA256 hash SHA256 Egg 2.7
just-watch-1.0.0b1.tar.gz (3.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page