{ "info": { "author": "Christian Theune", "author_email": "ct@gocept.com", "bugtrack_url": null, "classifiers": [], "description": "Using the lockd API\n===================\n\nlockd provides a light-weight implementation of a locking mechanism for\nlong-running resources by maintaining lock files in a given directory.\n\n>>> import tempfile\n>>> lockdir = tempfile.mkdtemp()\n>>> from gocept.lockd.lockd import Lockd\n>>> daemon = Lockd(lockdir)\n\nResources are identified by a string and clients performing the lock are\nidentified by another string:\n\n>>> daemon.lock('resource1', 'client1')\n\nOnce a resource is locked, it can not be locked again:\n\n>>> daemon.lock('resource1', 'client2')\nTraceback (most recent call last):\nException: Resource already locked by 'client1'\n\nHowever, other resources can be locked in parallel:\n\n>>> daemon.lock('resource2', 'client2')\n\nClients, other than the client who locked a resource, can not unlock it:\n\n>>> daemon.unlock('resource1', 'client2')\nTraceback (most recent call last):\nException: Resource locked by 'client1' cannot be unlocked by 'client2'\n\nThe client, who locked the resource, can unlock it again:\n\n>>> daemon.unlock('resource1', 'client1')\n\nOnce unlocked, it can not be unlocked a second time:\n\n>>> daemon.unlock('resource1', 'client1')\nTraceback (most recent call last):\nException: Resource not locked\n\n\nIMPORTANT security note\n=======================\n\nResource identification and client authorization are out of scope for\nlockd. It should only be used and exposed within a trusted environment.\n\n\nCleanup:\n\n>>> import shutil\n>>> shutil.rmtree(lockdir)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": null, "license": "ZPL 2.1", "maintainer": null, "maintainer_email": null, "name": "gocept.lockd", "package_url": "https://pypi.org/project/gocept.lockd/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/gocept.lockd/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/gocept.lockd/0.1/", "requires_dist": null, "requires_python": null, "summary": "A simple XML-RPC-based lock daemon to support fencing.", "version": "0.1" }, "last_serial": 792564, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "dd0cd2c54952d01916ce65275a7eaefb", "sha256": "f7d37670134ddede6a09ea4694e8d1dce42b0d0c9b4fc39f370bf84560af3e1d" }, "downloads": -1, "filename": "gocept.lockd-0.1.tar.gz", "has_sig": false, "md5_digest": "dd0cd2c54952d01916ce65275a7eaefb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4017, "upload_time": "2008-12-18T12:05:12", "url": "https://files.pythonhosted.org/packages/94/8a/8f2c13b34bfa1b461b46c6f1bf988eb72ce9100ad98fc84cd02b6cd4f66c/gocept.lockd-0.1.tar.gz" } ], "0.1dev": [] }, "urls": [ { "comment_text": "", "digests": { "md5": "dd0cd2c54952d01916ce65275a7eaefb", "sha256": "f7d37670134ddede6a09ea4694e8d1dce42b0d0c9b4fc39f370bf84560af3e1d" }, "downloads": -1, "filename": "gocept.lockd-0.1.tar.gz", "has_sig": false, "md5_digest": "dd0cd2c54952d01916ce65275a7eaefb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4017, "upload_time": "2008-12-18T12:05:12", "url": "https://files.pythonhosted.org/packages/94/8a/8f2c13b34bfa1b461b46c6f1bf988eb72ce9100ad98fc84cd02b6cd4f66c/gocept.lockd-0.1.tar.gz" } ] }