{ "info": { "author": "Nitzan Miron", "author_email": "nitzanm@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "=======\nPyElock\n=======\n\nPure Python wrapper for https://github.com/dustin/elock .\n\nelock is \"A simple, fault-tolerant distributed lock server in erlang.\" Using\nit in Python allows you to do all sorts of cool stuff, like ensuring a Celery\ntask doesn't run more than once simultaneously, even across different Celery\nservers.\n\nNote, if you are already using Twisted in your project, you should check out\ndustin's wrapper at https://github.com/dustin/elock-twisted .\n\nUsage\n=====\n\nSimple single lock:\n\n try:\n with pyelock.ELockSingle(('remote-server.domain.com', 11400), 'my_lock'):\n # Do some stuff\n time.sleep(10)\n except pyelock.LockInUse:\n print \"Can't do stuff, my_lock is in use\"\n\nIf you want precise control over your locking behavior, or want to acquire\nmultiple locks, use the following code:\n\n with pyelock.ELock(('remote-server.domain.com', 11400)) as elock:\n # Acquire a lock, waiting up to 30 seconds for it\n if not elock.lock('my_lock', timeout=30.0):\n print \"Oh no, can't get my_lock\"\n \n # Acquire another lock, without waiting if it's locked\n if not elock.lock('my_other_lock'):\n print \"Can't get my_other_lock\"\n \n # Do some stuff...\n \n # Release first lock\n elock.unlock('my_lock')\n \n # Do some other stuff...\n \n # Note: you don't technically need to release locks right before the end\n # of the 'with' block, since all locks held will be automatically released\n # when the object is destroyed.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/PyELock/", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "PyELock", "package_url": "https://pypi.org/project/PyELock/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/PyELock/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/PyELock/" }, "release_url": "https://pypi.org/project/PyELock/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "Pure Python wrapper for elock distributed locking server.", "version": "1.0.2" }, "last_serial": 1079734, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "80185ca11da8d17d74c7e8d4797a97a8", "sha256": "2d31d8ab766d2328cd9880764383ce83e599bbcb0dce13331e76db18364510df" }, "downloads": -1, "filename": "PyELock-1.0.0.zip", "has_sig": false, "md5_digest": "80185ca11da8d17d74c7e8d4797a97a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3818, "upload_time": "2013-08-24T17:28:15", "url": "https://files.pythonhosted.org/packages/aa/b9/c02d0e68f7a89ea32db40d172236f555c6c087e3b590a44d63b3e86bb1f3/PyELock-1.0.0.zip" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "065e871d7249066a52aedcbadc0f36ed", "sha256": "5ac9301410fd8dd19574602ce39b0aa67fba1919fd5ebf7edc86d5611d71aa64" }, "downloads": -1, "filename": "PyELock-1.0.1.zip", "has_sig": false, "md5_digest": "065e871d7249066a52aedcbadc0f36ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4130, "upload_time": "2013-08-27T19:28:26", "url": "https://files.pythonhosted.org/packages/ee/8a/45f45df556c5f628d6f27704b256ea0d7c08ddc41984d9f1d20142c1e4cf/PyELock-1.0.1.zip" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "aacb3c435540759052a78a98fdf6091a", "sha256": "0c44769ee4a1738cbd8cec734761ff0d538a958182177d182fb5b7e50d9b7596" }, "downloads": -1, "filename": "PyELock-1.0.2.zip", "has_sig": false, "md5_digest": "aacb3c435540759052a78a98fdf6091a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4426, "upload_time": "2014-05-03T16:33:41", "url": "https://files.pythonhosted.org/packages/ea/ab/de0678aeb76b2b9b89df19159ce3038a429e6d7cc9c5c9e4408abde3e3c4/PyELock-1.0.2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "aacb3c435540759052a78a98fdf6091a", "sha256": "0c44769ee4a1738cbd8cec734761ff0d538a958182177d182fb5b7e50d9b7596" }, "downloads": -1, "filename": "PyELock-1.0.2.zip", "has_sig": false, "md5_digest": "aacb3c435540759052a78a98fdf6091a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4426, "upload_time": "2014-05-03T16:33:41", "url": "https://files.pythonhosted.org/packages/ea/ab/de0678aeb76b2b9b89df19159ce3038a429e6d7cc9c5c9e4408abde3e3c4/PyELock-1.0.2.zip" } ] }