{ "info": { "author": "Michael Williamson", "author_email": "mike@zwobble.org", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: Microsoft :: Windows", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "locket.py\n=========\n\nLocket implements a lock that can be used by multiple processes provided they use the same path.\n\n.. code-block:: python\n\n import locket\n\n # Wait for lock\n with locket.lock_file(\"path/to/lock/file\"):\n perform_action()\n\n # Raise error if lock cannot be acquired immediately\n with locket.lock_file(\"path/to/lock/file\", timeout=0):\n perform_action()\n \n # Raise error if lock cannot be acquired after thirty seconds\n with locket.lock_file(\"path/to/lock/file\", timeout=30):\n perform_action()\n \n # Without context managers:\n lock = locket.lock_file(\"path/to/lock/file\")\n try:\n lock.acquire()\n perform_action()\n finally:\n lock.release()\n\nLocks largely behave as (non-reentrant) `Lock` instances from the `threading`\nmodule in the standard library. Specifically, their behaviour is:\n\n* Locks are uniquely identified by the file being locked,\n both in the same process and across different processes.\n\n* Locks are either in a locked or unlocked state.\n\n* When the lock is unlocked, calling `acquire()` returns immediately and changes\n the lock state to locked.\n\n* When the lock is locked, calling `acquire()` will block until the lock state\n changes to unlocked, or until the timeout expires.\n\n* If a process holds a lock, any thread in that process can call `release()` to\n change the state to unlocked.\n\n* Behaviour of locks after `fork` is undefined.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/mwilliamson/locket.py", "keywords": "lock filelock lockfile process", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "locket", "package_url": "https://pypi.org/project/locket/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/locket/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/mwilliamson/locket.py" }, "release_url": "https://pypi.org/project/locket/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "File-based locks for Python for Linux and Windows", "version": "0.2.0" }, "last_serial": 1553834, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f18eaf932cdbd6306fc738f84908a37b", "sha256": "d09df6d9f55dce5c76d46226032c6536f768a3d2aa1903b98ba2becfe3cb5e9d" }, "downloads": -1, "filename": "locket-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f18eaf932cdbd6306fc738f84908a37b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1595, "upload_time": "2013-02-03T23:14:39", "url": "https://files.pythonhosted.org/packages/83/ec/96ef2a7e1e19e7d033cc74501d4526250143cd008c46313136f27b7f498d/locket-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "934bb2efb5d9885bc901473f02a0fe3d", "sha256": "503e4dab2235cebaa5104a055bd1653e912f333ed5c05772753784e03b2f4df6" }, "downloads": -1, "filename": "locket-0.1.1.tar.gz", "has_sig": false, "md5_digest": "934bb2efb5d9885bc901473f02a0fe3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1594, "upload_time": "2013-02-03T23:54:31", "url": "https://files.pythonhosted.org/packages/e0/b3/4bbfe048511d708bfcf0a09bfb5d3f7f251090018aace86337509db16fea/locket-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "fe870949c513d8f7079ba352463833ca", "sha256": "1fee63c1153db602b50154684f5725564e63a0f6d09366a1cb13dffcec179fb4" }, "downloads": -1, "filename": "locket-0.2.0.tar.gz", "has_sig": false, "md5_digest": "fe870949c513d8f7079ba352463833ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3506, "upload_time": "2015-05-19T22:03:16", "url": "https://files.pythonhosted.org/packages/d0/22/3c0f97614e0be8386542facb3a7dcfc2584f7b83608c02333bced641281c/locket-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fe870949c513d8f7079ba352463833ca", "sha256": "1fee63c1153db602b50154684f5725564e63a0f6d09366a1cb13dffcec179fb4" }, "downloads": -1, "filename": "locket-0.2.0.tar.gz", "has_sig": false, "md5_digest": "fe870949c513d8f7079ba352463833ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3506, "upload_time": "2015-05-19T22:03:16", "url": "https://files.pythonhosted.org/packages/d0/22/3c0f97614e0be8386542facb3a7dcfc2584f7b83608c02333bced641281c/locket-0.2.0.tar.gz" } ] }