{ "info": { "author": "Boris Kaul", "author_email": "me@boriskaul.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 3" ], "description": "=========\n filespy\n=========\n\n.. image:: https://travis-ci.org/localvoid/py-filespy.png?branch=master\n\nFileSpy is a simple library that helps you detect filesystem changes.\n\n\nAPI\n===\n\nCHANGE_TYPE\n-----------\n\n``CREATED = 0``\n\n``DELETED = 1``\n\n``MODIFIED = 2``\n\nmake_snapshot\n-------------\n\n``make_snapshot(path, followlinks=False) -> dict()``\n\n``path`` - directory path\n\n``followlinks=False`` - follow links when traversing through directory\n\nCreates a directory snapshot. Snapshot doesn't hold any information\nabout directory in which this snapshot was done, so you can easily\ncompare directories in a different locations.\n\nIt returns a simple dictionary, where keys is a file path and value is\nos.stat() of this file. It is done in a such way to make serialization\nof this data as simple as possible.\n\nsnapshot_diff\n-------------\n\n``snapshot_diff(s1, s2) -> tuple(CHANGE_TYPE, path)``\n\nGenerator that yields changes between two snapshots.\n\n\nExample\n=======\n\n.. code:: python\n\n s1 = filespy.make_snapshot('/dir')\n time.sleep(3)\n s2 = filespy.make_snapshot('/dir')\n for t, path in filespy.snapshot_diff(s1, s2):\n if t == filespy.CREATED:\n on_create(path)\n elif t == filespy.DELETED:\n on_delete(path)\n\nHere we are taking snapshot of the directory ``/dir``, then sleep for\n3 seconds, take another snapshot, and finally looking at the changes.\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/localvoid/py-filespy/tarball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/localvoid/py-filespy/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "filespy", "package_url": "https://pypi.org/project/filespy/", "platform": "Any", "project_url": "https://pypi.org/project/filespy/", "project_urls": { "Download": "https://github.com/localvoid/py-filespy/tarball/master", "Homepage": "https://github.com/localvoid/py-filespy/" }, "release_url": "https://pypi.org/project/filespy/1.1/", "requires_dist": null, "requires_python": null, "summary": "find changes in a directory", "version": "1.1" }, "last_serial": 791965, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "85afadbea0aa438bc7a29fc4d132b46c", "sha256": "7521bebb47d721dc2b5d146f639855d83c47fa270f1b30ebf1e1ae15d5365bca" }, "downloads": -1, "filename": "filespy-1.1.tar.gz", "has_sig": false, "md5_digest": "85afadbea0aa438bc7a29fc4d132b46c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2346, "upload_time": "2013-06-15T09:53:51", "url": "https://files.pythonhosted.org/packages/9e/00/de010eacfaa3336a4645c5345085783f00e2c828af50b86dcdf8a2d74fda/filespy-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "85afadbea0aa438bc7a29fc4d132b46c", "sha256": "7521bebb47d721dc2b5d146f639855d83c47fa270f1b30ebf1e1ae15d5365bca" }, "downloads": -1, "filename": "filespy-1.1.tar.gz", "has_sig": false, "md5_digest": "85afadbea0aa438bc7a29fc4d132b46c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2346, "upload_time": "2013-06-15T09:53:51", "url": "https://files.pythonhosted.org/packages/9e/00/de010eacfaa3336a4645c5345085783f00e2c828af50b86dcdf8a2d74fda/filespy-1.1.tar.gz" } ] }