{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "filesystem watcher\n==================\n\n.. image:: https://img.shields.io/pypi/v/fs-watcher.svg?style=flat-square\n :target: https://warehouse.python.org/project/fs-watcher/\n :alt: fs-watcher on PyPI\n\n.. image:: https://img.shields.io/pypi/l/fs-watcher.svg?style=flat-square\n :target: https://warehouse.python.org/project/fs-watcher/\n :alt: fs-watcher on PyPI\n\n.. image:: https://img.shields.io/github/issues/paleg/Watcher.svg?style=flat-square\n :target: https://github.com/paleg/Watcher/issues\n :alt: GitHub issues for Watcher\n\n|\n\n.. contents:: :local:\n\nOverview\n--------\n\n``Watcher`` is a daemon that watches specified files/folders for changes and\nfires commands in response to those changes. It is similar to\nincron_, however, configuration uses a simpler\nto read ini file instead of a plain text file. Unlike incron it can also\nrecursively monitor directories.\n\nIt's written in Python, making it easier to hack.\n\n* `Source on GitHub `_\n* `Packages on PyPI `_\n\nThis fork is a rewritting of the code using python-daemon implementation of PEP3143_ with additional features:\n\n* async commands executing which allows several copies of command can be executed simultaneously for single job\n* capturing command output to separate log file\n* exclude watching files by regular expression\n* perform actions on successful/failure command completion.\n\nRequirements\n------------\n\n``Watcher`` supports both Python 2.7 and Python 3.x. It has following dependencies which can be installed with your package manager or `pip`:\n\n* pyinotify_\n* python-daemon_\n* lockfile_\n* chardet_\n* future_\n\nTo install dependencies on Debian:\n\n.. code-block:: bash\n\n sudo apt-get install python-pyinotify python-daemon python-lockfile python-chardet python-future\n\n.. code-block:: bash\n\n sudo apt-get install python3-pyinotify python3-daemon python3-lockfile python3-chardet python3-future\n\nTo install dependencies on Gentoo:\n\n.. code-block:: bash\n\n emerge -av dev-python/pyinotify dev-python/python-daemon dev-python/lockfile dev-python/chardet dev-python/future\n\npip_ will install dependencies automatically.\n\nInstallation\n------------\n\nDebian\n~~~~~~\n\nDownload latest deb package from `GitHub releases page `_ and install it with ``dpkg``.\n\n.. code-block:: bash\n\n sudo dpkg -i fs-watcher_X.Y.Z-0_all.deb\n\nIn addition to ``Watcher`` itself, it will install:\n\n* sample configuration file to ``/etc/watcher.ini``\n* systemd service ``fs-watcher`` (in disabled state).\n\nTo start using ``Watcher`` you must change ``/etc/watcher.ini`` to suit your needs and enable/start ``fs-watcher`` service.\n\nPip\n~~~\nSystem-wide using pip_:\n\n.. code-block:: bash\n\n sudo pip install fs-watcher\n\n.. code-block:: bash\n\n sudo pip3 install fs-watcher\n\n\nThis command will install:\n\n* Python modules for ``Watcher``\n* sample configuration file\n* samples of startup scripts\n* executable to start ``Watcher``\n\nUse following command to check exact locations:\n\n.. code-block:: bash\n\n pip show -f fs-watcher\n\nThere are samples of startup scripts. Use your init system manual to install them properly. Check/fix path to ``Watcher`` executable in samples before using, by default it is assumed to be ``/usr/sbin/watcher``.\n\nFor systemd:\n\n.. code-block:: bash\n\n cp share/init/fs-watcher.service /etc/systemd/system/fs-watcher.service\n systemctl daemon-reload\n systemctl enable fs-watcher\n systemctl start fs-watcher\n\nFor SysV:\n\n.. code-block:: bash\n\n cp share/init/fs-watcher.sysvinit /etc/init.d/fs-watcher\n update-rc.d fs-watcher defaults\n /etc/init.d/fs-watcher start\n\nFor OpenRC:\n\n.. code-block:: bash\n\n cp share/init/fs-watcher.openrc /etc/init.d/fs-watcher\n rc-update add fs-watcher default\n /etc/init.d/fs-watcher start\n\n\nConfiguration\n-------------\n\nCheck provided `watcher.ini`_ file for an example job configuration. The config file should reside in ``/etc/watcher.ini`` or ``~/.watcher.ini``. You can also specify the path to the config file as a command line parameter using the ``--config`` option.\n\nIf you edit the ini file you must restart the daemon for it to reload the configuration.\n\nUsage\n-----\n\n.. code::\n\n\tusage: watcher [-h] [--version] [-c CONFIG] [-v] {start,stop,restart,debug}\n\n\tpositional arguments:\n\t {start,stop,restart,debug}\n\t\t\t\t\t\t\tWhat to do.\n\n\toptional arguments:\n\t -h, --help show this help message and exit\n\t --version show program's version number and exit\n\t -c CONFIG, --config CONFIG\n\t\t\t\t\t\t\tPath to the config file (default: None)\n\t -v, --verbose verbose output\n\nDebug mode\n~~~~~~~~~~\nYou can start ``Watcher`` with `debug` positional argument to prevent it from forking to the background and log messages to stdout:\n\n.. code-block:: bash\n\n\twatcher debug\n\nIncreasing the amount of inotify watchers\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThere is a limit of max number of inotify watchers. When this limit is not enough to monitor all jobs, the limit must be increased for ``Watcher`` to work properly. You can find following error in log when facing this limit:\n\n.. code::\n\n add_watch: cannot watch /...... WD=-1, Errno=No space left on device (ENOSPC)\n\nIf you are running Debian, RedHat, or another similar Linux distribution, run the following in a terminal to increase this limit:\n\n.. code-block:: bash\n\n echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p\n\nIncreasing the amount of queued events\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThere is a limit of max queued events. When this limit is not enough to monitor all jobs, the limit must be increased for ``Watcher`` to work properly. You can find following warning in log when facing this limit:\n\n.. code::\n\n pyinotify - WARNING - Event queue overflowed.\n\nIf you are running Debian, RedHat, or another similar Linux distribution, run the following in a terminal to increase this limit:\n\n.. code-block:: bash\n\n echo fs.inotify.max_queued_events=65536 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p\n\n.. _incron: http://incron.aiken.cz/\n.. _PEP3143: http://legacy.python.org/dev/peps/pep-3143/\n.. _pyinotify: http://github.com/seb-m/pyinotify\n.. _python-daemon: https://alioth.debian.org/projects/python-daemon/\n.. _lockfile: https://launchpad.net/pylockfile\n.. _chardet: https://chardet.github.io/\n.. _future: https://pypi.python.org/pypi/future\n.. _pip: https://pip.readthedocs.org/\n.. _watcher.ini: /debian/watcher.ini\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/paleg/Watcher/releases", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/paleg/Watcher", "keywords": "inotify,filesystem,python,watcher", "license": "MIT", "maintainer": "Oleg Palij", "maintainer_email": "o.palij@gmail.com", "name": "fs-watcher", "package_url": "https://pypi.org/project/fs-watcher/", "platform": "Linux", "project_url": "https://pypi.org/project/fs-watcher/", "project_urls": { "Download": "https://github.com/paleg/Watcher/releases", "Homepage": "https://github.com/paleg/Watcher" }, "release_url": "https://pypi.org/project/fs-watcher/1.0.10/", "requires_dist": [ "future", "pyinotify", "python-daemon", "lockfile", "chardet" ], "requires_python": "", "summary": "Daemon that watches specified files/folders for changes and fires commands in response to those changes", "version": "1.0.10" }, "last_serial": 5817484, "releases": { "1.0.10": [ { "comment_text": "", "digests": { "md5": "80d09d723d58f7d1acec859dcca7edac", "sha256": "56c9a71b6696fd939e05cfecc8c499c1d5ec73c3ab91a9ed0836ede9e7329124" }, "downloads": -1, "filename": "fs_watcher-1.0.10-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "80d09d723d58f7d1acec859dcca7edac", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16770, "upload_time": "2019-09-12T00:08:55", "url": "https://files.pythonhosted.org/packages/fa/27/b77fc87870f7f00694a9ed0b4b2efe7992e19a39effa40e3f9d3da8ecb0f/fs_watcher-1.0.10-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3371184ab07c3d9555f061253f1c0c3a", "sha256": "8d8e94a84f32d79c4a5d77c411f6d22e9dc0535fe34c4488d635efd6d45c9652" }, "downloads": -1, "filename": "fs-watcher-1.0.10.tar.gz", "has_sig": false, "md5_digest": "3371184ab07c3d9555f061253f1c0c3a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15558, "upload_time": "2019-09-12T00:08:59", "url": "https://files.pythonhosted.org/packages/d0/61/80adcea1a3f1c78f71df97915b0e2764a159b141c08f459fba1ba99ebf21/fs-watcher-1.0.10.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "b3d16ab5b42e191c839290d32b870956", "sha256": "10f9875c5c63a62afa09e79d45919dcc0fc8a99ac5fb9a0e684e987ddf9bd484" }, "downloads": -1, "filename": "fs-watcher-1.0.5.tar.gz", "has_sig": false, "md5_digest": "b3d16ab5b42e191c839290d32b870956", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15128, "upload_time": "2017-08-22T12:17:06", "url": "https://files.pythonhosted.org/packages/ba/f4/7e10caeaabadce99527cce3c0ada28e3a10b5d6aaeb8930dc85fffc463c7/fs-watcher-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "ef0aa757c18c8d48b40646422252a6f7", "sha256": "67d0da5604d7d95967801d7924403f4139de685c98920b4b4f1bfca4df66082e" }, "downloads": -1, "filename": "fs_watcher-1.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ef0aa757c18c8d48b40646422252a6f7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19165, "upload_time": "2018-09-21T13:01:56", "url": "https://files.pythonhosted.org/packages/e4/c4/37a997ec78c545bf99ce45f9ea36bc67dabfbdbdf89d96355dc505eb6970/fs_watcher-1.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "10328305894c1a1d37b7e6780c3ff683", "sha256": "325368aa72d623bcd330d9ac3e1c004cc696fdb93bd93eeed0863ebf75ba44b3" }, "downloads": -1, "filename": "fs-watcher-1.0.6.tar.gz", "has_sig": false, "md5_digest": "10328305894c1a1d37b7e6780c3ff683", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16010, "upload_time": "2018-09-21T13:01:58", "url": "https://files.pythonhosted.org/packages/90/c7/9967f3fb241e4fff8c23d3f3b4a2715b8a31da6912657bc109eb77dc8d2d/fs-watcher-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "bff2bec64bea41ea885f6c96805fa9d6", "sha256": "674e249bebd40405afc25c4ed59852418884a83a72fc3200ef8c197a41bb1025" }, "downloads": -1, "filename": "fs_watcher-1.0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bff2bec64bea41ea885f6c96805fa9d6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19202, "upload_time": "2018-11-20T17:27:56", "url": "https://files.pythonhosted.org/packages/8e/b6/f9eab439d6febf40dc196b58f7a64c2c6cda916cf26e5e7848ddad492263/fs_watcher-1.0.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c9b3e973153da379fff4bcddacddc74c", "sha256": "87bd08629898cc7d272b127b846a55432e70b55d885752db8c35e490b73c6234" }, "downloads": -1, "filename": "fs-watcher-1.0.7.tar.gz", "has_sig": false, "md5_digest": "c9b3e973153da379fff4bcddacddc74c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15458, "upload_time": "2018-11-20T17:27:58", "url": "https://files.pythonhosted.org/packages/3b/3d/d8a8ee778c697dcd4fe5b5595d67eecade28c40012df7ec0bffd8231979d/fs-watcher-1.0.7.tar.gz" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "b44f1036488c58d12d82b9dfb39312a8", "sha256": "a9c1372999867cedb80a515f0eda6509b4ad062ea2acf3277114d376f46a5b70" }, "downloads": -1, "filename": "fs_watcher-1.0.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b44f1036488c58d12d82b9dfb39312a8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16675, "upload_time": "2019-09-03T16:50:17", "url": "https://files.pythonhosted.org/packages/d8/e8/47d78b28a31d2fd69ccfbca81f0d2dc182ce8fd4139a252cc3e87c1751fa/fs_watcher-1.0.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "38a4c1eb29625c72ccdb936459131793", "sha256": "2cd8450a0bc16ce3458b3dfe6bff04e4d36dc29f812f655ca349b958af58b509" }, "downloads": -1, "filename": "fs-watcher-1.0.8.tar.gz", "has_sig": false, "md5_digest": "38a4c1eb29625c72ccdb936459131793", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16081, "upload_time": "2019-09-03T16:50:19", "url": "https://files.pythonhosted.org/packages/bc/0d/48c7c5f3b6a70a5fb81212412b3831b40a99d156ee4f4f478b8a95259fe2/fs-watcher-1.0.8.tar.gz" } ], "1.0.9": [ { "comment_text": "", "digests": { "md5": "a46463df3112705a7fb9a8f9fe5981c6", "sha256": "f024c198c809cc113798281620f2cb19b4fbaccf48eae6c48a9dd32fd23b29c2" }, "downloads": -1, "filename": "fs_watcher-1.0.9-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a46463df3112705a7fb9a8f9fe5981c6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16740, "upload_time": "2019-09-04T09:16:59", "url": "https://files.pythonhosted.org/packages/33/44/1f838bbe7e437a107d811b2d38ca46a2a72831573a2f297b50ccf375b9d5/fs_watcher-1.0.9-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2f010350602860496e79d8281ad2c5c0", "sha256": "51e852d764f67710291a50c18fcd4dc45ffb3a2603bd0bb0b6f84aec46c1d451" }, "downloads": -1, "filename": "fs-watcher-1.0.9.tar.gz", "has_sig": false, "md5_digest": "2f010350602860496e79d8281ad2c5c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15535, "upload_time": "2019-09-04T09:17:02", "url": "https://files.pythonhosted.org/packages/c5/89/cd0f955822d50e28a7c5f088ca83f139a055cc5a3c1e219f776e03a323eb/fs-watcher-1.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "80d09d723d58f7d1acec859dcca7edac", "sha256": "56c9a71b6696fd939e05cfecc8c499c1d5ec73c3ab91a9ed0836ede9e7329124" }, "downloads": -1, "filename": "fs_watcher-1.0.10-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "80d09d723d58f7d1acec859dcca7edac", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16770, "upload_time": "2019-09-12T00:08:55", "url": "https://files.pythonhosted.org/packages/fa/27/b77fc87870f7f00694a9ed0b4b2efe7992e19a39effa40e3f9d3da8ecb0f/fs_watcher-1.0.10-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3371184ab07c3d9555f061253f1c0c3a", "sha256": "8d8e94a84f32d79c4a5d77c411f6d22e9dc0535fe34c4488d635efd6d45c9652" }, "downloads": -1, "filename": "fs-watcher-1.0.10.tar.gz", "has_sig": false, "md5_digest": "3371184ab07c3d9555f061253f1c0c3a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15558, "upload_time": "2019-09-12T00:08:59", "url": "https://files.pythonhosted.org/packages/d0/61/80adcea1a3f1c78f71df97915b0e2764a159b141c08f459fba1ba99ebf21/fs-watcher-1.0.10.tar.gz" } ] }