{ "info": { "author": "Malthe Borch", "author_email": "mborch@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: MacOS :: MacOS X", "Programming Language :: C", "Programming Language :: Python :: 2.4", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Filesystems" ], "description": ".. contents::\n\nOverview\n========\n\n.. role:: mod(emphasis)\n\n:mod:`MacFSEvents` is a Python library that provides thread-safe\ndirectory observation primitives using callbacks. It wraps the Mac OS\nX ``FSEvents`` API in a C-extension.\n\nRequirements:\n\n- Mac OS X 10.5+ (Leopard)\n- Python 2.7+\n\nThis software was written by Malthe Borch . The\n:mod:`pyfsevents` module by Nicolas Dumazet was used for reference.\n\n.. image:: https://travis-ci.org/malthe/macfsevents.svg\n :target: https://travis-ci.org/malthe/macfsevents\n\nWhy?\n----\n\nAt this time of writing there are four other libraries that integrate\nwith the ``FSEvents`` API:\n\n**watchdog**:\n\n This library actually builds on the code in :mod:`MacFSEvents` (this\n project), but currently does not support Python 3 (though this\n should happen soon). It also includes shell utilities.\n\n**pyobjc-framework-FSEvents**\n\n These use the PyObjC bridge infrastructure which most applications\n do not need.\n\n**pyfsevents**\n\n Not thread-safe (API is not designed to support it).\n\n**fsevents**\n\n Obsolete bindings to the socket API by John Sutherland.\n\nThe :mod:`MacFSEvents` library provides a clean API and has full test\ncoverage.\n\nNote that :mod:`pyfsevents` has bindings to the file descriptor\nobservation primitives. This is not currently implemented by the\npresent library.\n\nLicense\n-------\n\nMade available as-is under the BSD License.\n\nUsage\n=====\n\nTo observe a directory structure (recursively) under ``path``, we set\nup an observer thread and schedule an event stream::\n\n from fsevents import Observer\n observer = Observer()\n observer.start()\n\n def callback(FileEvent):\n ...\n\n from fsevents import Stream\n stream = Stream(callback, path)\n observer.schedule(stream)\n\nStreams can observe any number of paths; simply pass them as\npositional arguments (or using the ``*`` operator)::\n\n stream = Stream(callback, *paths)\n\nTo start the observer in its own thread, use the ``start`` method::\n\n observer.start()\n\nTo start the observer in the current thread, use the ``run`` method\n(it will block the thread until stopped from another thread)::\n\n observer.run()\n\nThe callback function will be called when an event occurs. \nDepending on the stream, the callback will have different signitures:\n\na) the standard stream (with callback and paths) will call callback with\n parameters callback(path, mask) where path is the directory where a file \n changed and mask can be decoded using FS_FLAG* and FS_ITEM* constants [#]_.\n a convenience class Mask has a __str__ function to get a text representation\n of the flags.\nb) the stream is created with ``ids = True`` keyword parameter. In this case the call\n is callback(path, mask, id). The id can be used in the ``since`` keyword\n parameter of another stream object to also recieve historic events (that\n happened before the stream became active)\nc) if ``file_events`` is kwarg set to True, a\n ``FileEvent`` instance is passed to the callback and has 3 attributes:\n ``mask``, ``cookie`` and ``name``. ``name`` parameter contains the path\n at which the event happened (may be a subdirectory) while ``mask``\n parameter is the event mask. this mimicks ``inotify`` behaviour. \n see also below.\n\nTo stop observation, simply unschedule the stream and stop the\nobserver::\n\n observer.unschedule(stream)\n observer.stop()\n\nWhile the observer thread will automatically join your main thread at\nthis point, it doesn't hurt to be explicit about this::\n\n observer.join()\n\nWe often want to know about events on a file level; to receive file\nevents instead of path events, pass in ``file_events=True`` to the\nstream constructor::\n\n def callback(event):\n ...\n\n stream = Stream(callback, path, file_events=True)\n\nThe event object mimick the file events of the ``inotify`` kernel\nextension available in newer linux kernels. It has the following\nattributes:\n\n``mask``\n The mask field is a bitmask representing the event that occurred.\n\n``cookie``\n The cookie field is a unique identifier linking together two related but separate events. It is used to link together an ``IN_MOVED_FROM`` and an ``IN_MOVED_TO`` event.\n\n``name``\n The name field contains the name of the object to which the event occurred. This is the absolute filename.\n\nNote that the logic to implement file events is implemented in Python;\na snapshot of the observed file system hierarchies is maintained and\nused to monitor file events.\n\n.. [#] See `FSEventStreamEventFlags `_ for a reference. To check for a particular mask, use the *bitwise and* operator ``&``.\n\n\nChangelog\n=========\n\n0.8.1 (2018-02-21)\n------------------\n\n- Fix brown-bag release.\n\n0.8 (2018-02-21)\n----------------\n\n- Fix bug that could lead to a segfault.\n [ElonKim]\n\n0.7 (2015-12-18)\n----------------\n\n- Remove slots definition.\n\n0.6 (2015-12-06)\n----------------\n\n- Fixed mask serialization on Python 3.\n\n\n0.5 (2015-12-02)\n----------------\n\n- Fixed thread handling issue which might result in a segmentation\n error.\n\n- Event IDs can be configure in the stream.\n\n- Added support for passing in create flags, latency and \"since fields\"\n to the Stream.\n\n- Added flags translation facility.\n\n- Supports UTF-8-MAC(NFD).\n\n\n0.4 (2014-10-23)\n----------------\n\n- Do not use 'Distribute'. It's been deprecated\n\n\n0.3 (2013-01-21)\n------------------\n\n- Added compatibility with Python 3. Note that Python 2.7 or better is\n now required.\n\n- Fixed test suite on with 10.8. The event masks reported on this\n platform are non-trivial which is a change from previous versions.\n\n0.2.8 (2012-06-09)\n------------------\n\nBugfixes:\n\n- Fix recursive snapshot.\n [thomasst]\n\n- Use os.lstat instead of os.stat to correctly detect symlinks.\n [thomasst]\n\n0.2.7 (2012-05-29)\n------------------\n\n- Added support for IN_ATTRIB.\n [thomasst]\n\n0.2.6 (2012-03-17)\n------------------\n\n- Fixed compilation problem on newer platforms.\n [nsfmc]\n\n0.2.5 (2012-02-01)\n------------------\n\n- Ignore files that don't exist while recursing.\n [bobveznat]\n\n0.2.4 (2010-12-06)\n------------------\n\n- Prevent crashes on recursive folder delete and multiple folder add.\n [totolici].\n\n0.2.3 (2010-07-27)\n------------------\n\n- Fixed broken release.\n\n0.2.2 (2010-07-26)\n------------------\n\n- Python 2.4 compatibility [howitz]\n\n- Fixed an issue where the addition of a new directory would crash the\n program when using file event monitoring [andymacp].\n\n0.2.1 (2010-04-27)\n------------------\n\n- Fixed an import issue [andymacp].\n\n0.2 (2010-04-26)\n----------------\n\n- Fixed issue where existing directories would be reported along with\n a newly created one [marcboeker].\n\n- Added support for file event monitoring.\n\n- Fixed reference counting bug which could result in a segmentation\n fault.\n\n0.1 (2009-11-27)\n----------------\n\n- Initial public release.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/malthe/macfsevents", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "MacFSEvents", "package_url": "https://pypi.org/project/MacFSEvents/", "platform": "Mac OS X", "project_url": "https://pypi.org/project/MacFSEvents/", "project_urls": { "Homepage": "https://github.com/malthe/macfsevents" }, "release_url": "https://pypi.org/project/MacFSEvents/0.8.1/", "requires_dist": null, "requires_python": "", "summary": "Thread-based interface to file system observation primitives.", "version": "0.8.1" }, "last_serial": 3601840, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "5b3b7b9e908ef74e9a25c80a1d382c4a", "sha256": "e06f5b2c152e51480de158fd2bd469b3db448a37e239652a87caec0c5d39012f" }, "downloads": -1, "filename": "MacFSEvents-0.1.tar.gz", "has_sig": false, "md5_digest": "5b3b7b9e908ef74e9a25c80a1d382c4a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10668, "upload_time": "2009-11-27T17:06:30", "url": "https://files.pythonhosted.org/packages/d2/a3/e5224d6315cc4f94816f2922ce849deb12a6f81f0d3095efe8cef1ca1cb7/MacFSEvents-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "9e1c9404da13c9138e5f6f93d348e43c", "sha256": "2b72aad8e79d95d85bbd42fb2c039b676836dea8be4ae4afbb2a08107afa1670" }, "downloads": -1, "filename": "MacFSEvents-0.2.tar.gz", "has_sig": false, "md5_digest": "9e1c9404da13c9138e5f6f93d348e43c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13735, "upload_time": "2010-04-26T16:14:50", "url": "https://files.pythonhosted.org/packages/f2/ce/bade590178ca971c596674111a5adb685108b047d0c5e2fb6c54fa77edd8/MacFSEvents-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "4a99d9c34c72406fdf4ade4bcdc2d7d7", "sha256": "22cfff67660b7ac8787fadb6288f61b88459dfb8ecaef5d7962405d14cc0ee74" }, "downloads": -1, "filename": "MacFSEvents-0.2.1.tar.gz", "has_sig": false, "md5_digest": "4a99d9c34c72406fdf4ade4bcdc2d7d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13918, "upload_time": "2010-04-27T17:09:00", "url": "https://files.pythonhosted.org/packages/3a/ca/813c4c29754ca0fa451c94da683db68a51389073553a040952a276c888ba/MacFSEvents-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "4028aa427b8438bfb48e8d9ccd3fb60a", "sha256": "a5eb322d33cb53b2855c89a30f33c9a66578bb3ea217da62018acf32ed9647e5" }, "downloads": -1, "filename": "MacFSEvents-0.2.2.tar.gz", "has_sig": false, "md5_digest": "4028aa427b8438bfb48e8d9ccd3fb60a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6310, "upload_time": "2010-07-26T16:50:29", "url": "https://files.pythonhosted.org/packages/a2/b5/f3b17e9221203858ac844a21e66df30ec51e20a3a1026e33ed866d6922f1/MacFSEvents-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "1daa0f9274e1cd5575c2e3bc660cf2bd", "sha256": "e87e0c7d87472936b7fd15fe0441b701db24b3be5a4f6ca041448f0d8007e874" }, "downloads": -1, "filename": "MacFSEvents-0.2.3.tar.gz", "has_sig": false, "md5_digest": "1daa0f9274e1cd5575c2e3bc660cf2bd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12496, "upload_time": "2010-07-27T20:36:32", "url": "https://files.pythonhosted.org/packages/24/23/34dbb460cc366b005930b7f076a020c5b31bc1a7247fc3a2740374088e54/MacFSEvents-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "950033eb0a138a131c8c9c0f933ce6d8", "sha256": "53cd27e5e11b1030e2bd3ca183c06ef3cb94e254b1fd37c4750f08ed72fa7d7d" }, "downloads": -1, "filename": "MacFSEvents-0.2.4.tar.gz", "has_sig": false, "md5_digest": "950033eb0a138a131c8c9c0f933ce6d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14365, "upload_time": "2010-12-06T20:22:13", "url": "https://files.pythonhosted.org/packages/ce/9e/16c69b620e82b417cca1d2f48c39d6a702b12357c796e98ae593a6e5458d/MacFSEvents-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "4c2fe88c6734a1fc4f932f2f4c3522a6", "sha256": "d257512244f97e534a6f5bdc8f790f5d490dcef6f54eec8bb298b90c17521220" }, "downloads": -1, "filename": "MacFSEvents-0.2.5.tar.gz", "has_sig": false, "md5_digest": "4c2fe88c6734a1fc4f932f2f4c3522a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12994, "upload_time": "2012-02-01T13:27:30", "url": "https://files.pythonhosted.org/packages/e3/28/f6352b35d473757b72d45ddf66f69a2ee25ef917b6c787777f6715131b5f/MacFSEvents-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "fe39c79cd5c0b89ad5d0b32a775bdc97", "sha256": "d2517b50d58e260a6efab8f9978f997939ceee11f6e1161065d73db703eb7708" }, "downloads": -1, "filename": "MacFSEvents-0.2.6.tar.gz", "has_sig": false, "md5_digest": "fe39c79cd5c0b89ad5d0b32a775bdc97", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13081, "upload_time": "2012-03-17T16:46:47", "url": "https://files.pythonhosted.org/packages/7d/f8/548c55e106a1b78596824b3c060a90a7bff9d9e97057fdfdc789aa619870/MacFSEvents-0.2.6.tar.gz" } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "f00f3fac0bc70913a54d433269b42174", "sha256": "3392a9a23ad3217abeb97ce90ce5040ab193579d869794bc0e6cbb20427747a4" }, "downloads": -1, "filename": "MacFSEvents-0.2.7.tar.gz", "has_sig": false, "md5_digest": "f00f3fac0bc70913a54d433269b42174", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13144, "upload_time": "2012-05-29T09:40:40", "url": "https://files.pythonhosted.org/packages/ec/99/85e3e61b6cb7a7098e4d766fc784af468743c450360c7622755c343e4874/MacFSEvents-0.2.7.tar.gz" } ], "0.2.8": [ { "comment_text": "", "digests": { "md5": "1e02931aa6f0ba68f979e542c0a12341", "sha256": "465993a15ee48d5ac4fd91d6a8c32e59178412a303a1117b0ea3370cc58d41da" }, "downloads": -1, "filename": "MacFSEvents-0.2.8.tar.gz", "has_sig": false, "md5_digest": "1e02931aa6f0ba68f979e542c0a12341", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13231, "upload_time": "2012-06-09T12:59:06", "url": "https://files.pythonhosted.org/packages/bf/64/90fe69365de38720d9435160b777c7aa6f489daf315724e81510961ce6ca/MacFSEvents-0.2.8.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "69660eba7e146ad21a4d23253a0fe24a", "sha256": "64b2ecee53cf8972c5295354090ab307324913f020139eec44e6de690db24a3f" }, "downloads": -1, "filename": "MacFSEvents-0.3.tar.gz", "has_sig": false, "md5_digest": "69660eba7e146ad21a4d23253a0fe24a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16092, "upload_time": "2013-01-21T14:23:20", "url": "https://files.pythonhosted.org/packages/96/19/eb77d09c52231bf128b4764ffa8ce67fe96669502369f17cec878bd1dfb8/MacFSEvents-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "2ffe399dc2cbd413f86388ff8d6b0458", "sha256": "5d492cf3181a782380fce3b704412aa9cfa4f4602dfcf07c071cd8da18685057" }, "downloads": -1, "filename": "MacFSEvents-0.4.tar.gz", "has_sig": false, "md5_digest": "2ffe399dc2cbd413f86388ff8d6b0458", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11535, "upload_time": "2014-10-23T15:09:50", "url": "https://files.pythonhosted.org/packages/54/d0/f1e2079b22edc29d013358fdb0b168c1b7253dabdc6533e939b400dbbbd6/MacFSEvents-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "de9cb9b2b99607180668415ac3963482", "sha256": "eb3f0ca56e60adfec84a45ed5d6333a1772fed29cae52e5fe264b9b5e412737e" }, "downloads": -1, "filename": "MacFSEvents-0.5.tar.gz", "has_sig": false, "md5_digest": "de9cb9b2b99607180668415ac3963482", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15493, "upload_time": "2015-12-02T10:33:14", "url": "https://files.pythonhosted.org/packages/13/05/e21376fd8774aea2ca38c0a1d9da27c1b814819e969aa07c4de55a98cb00/MacFSEvents-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "e78475da21fe0dcde06bc1de006fcb9b", "sha256": "f96c03ee143e2551c2fb802403470e614be9860a867caf6d7d3fbffedee31cdd" }, "downloads": -1, "filename": "MacFSEvents-0.6.tar.gz", "has_sig": false, "md5_digest": "e78475da21fe0dcde06bc1de006fcb9b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15540, "upload_time": "2015-12-06T08:46:19", "url": "https://files.pythonhosted.org/packages/8f/24/45aa8710030bd14c185976ff251ddc822b955b5a2ee328964d32b7b22273/MacFSEvents-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "089d52d40a088651302967b1d13c3825", "sha256": "95d3cddaf8a42435bfbd50087785ee9e3ebb8325242cfd06a88ea21f85bcb56f" }, "downloads": -1, "filename": "MacFSEvents-0.7.tar.gz", "has_sig": false, "md5_digest": "089d52d40a088651302967b1d13c3825", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15665, "upload_time": "2015-12-18T08:29:25", "url": "https://files.pythonhosted.org/packages/f4/fb/59f72719e339f6209997414c6d0b7e1e1f96900dede3ec1cc24008471cc2/MacFSEvents-0.7.tar.gz" } ], "0.8": [], "0.8.1": [ { "comment_text": "", "digests": { "md5": "45759553d58bab6f7c8d6187fb0fe12f", "sha256": "1324b66b356051de662ba87d84f73ada062acd42b047ed1246e60a449f833e10" }, "downloads": -1, "filename": "MacFSEvents-0.8.1.tar.gz", "has_sig": false, "md5_digest": "45759553d58bab6f7c8d6187fb0fe12f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13772, "upload_time": "2018-02-21T11:40:45", "url": "https://files.pythonhosted.org/packages/28/2e/1ff399cfd2a6a8ebb65152203c920643c2169aa507b2e96559d19baeb7c3/MacFSEvents-0.8.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "45759553d58bab6f7c8d6187fb0fe12f", "sha256": "1324b66b356051de662ba87d84f73ada062acd42b047ed1246e60a449f833e10" }, "downloads": -1, "filename": "MacFSEvents-0.8.1.tar.gz", "has_sig": false, "md5_digest": "45759553d58bab6f7c8d6187fb0fe12f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13772, "upload_time": "2018-02-21T11:40:45", "url": "https://files.pythonhosted.org/packages/28/2e/1ff399cfd2a6a8ebb65152203c920643c2169aa507b2e96559d19baeb7c3/MacFSEvents-0.8.1.tar.gz" } ] }