{ "info": { "author": "Nathan Black", "author_email": "nathan@appuri.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: ISC License (ISCL)", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Database :: Front-Ends", "Topic :: Software Development :: Libraries", "Topic :: System :: Distributed Computing" ], "description": "## Python Lock library for ETCD 2.0\n\nSince ETCD 0.4, all [the built in modules were removed](https://groups.google.com/d/msg/etcd-dev/ubcPWuL8wSg/7GeaxSHhIb0J), including the locking module. The API still provides an atomic compare-and-swap method to implement locking, thus providing the core functionality to create semaphores and mutexes. This library is built on top of that, matching the API that was in [python-etcd](https://github.com/jplana/python-etcd) before it was removed as much as possible.\n\n[![Circle CI](https://circleci.com/gh/appuri/python-etcd-lock.svg?style=shield)](https://circleci.com/gh/appuri/python-etcd-lock)\n\n#### Simple Usage\n\n```python\nimport etcd\nfrom etcdlock import Lock\n\nlock = Lock(etcd.Client(), 'path/to/my/key')\nwhile lock\n # lock is acquired\n # lock will renew itself by default until released\n # do work\n request = ....\n\n # check if we still have the lock\n if lock.is_locked() is False:\n return\n```\n\n#### Explicit Usage\n\n```python\nimport etcd\nfrom etcdlock import Lock\n\nclient = client = etcd.Client(host='api.example.com', protocol='https', port=443, version_prefix='/etcd')\nlock = Lock(client, 'path/to/my/key', ttl=30, renewSecondsPrior=)\nif lock.acquire(timeout=20):\n t = Thread(target=someheavywork)\n t.run()\n t.wait()\n lock.renew()\n # some other work\n lock.release() # not recommended, use a context manager\nelse\n # failed to acquire the lock in 20 seconds\n pass\n```\n\nPlease see [the tests](https://github.com/appuri/python-etcd-lock/blob/master/tests/lock_tests.py) while the documentation is lacking, thanks.", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/appuri/python-etcd-lock", "keywords": "etcd distributed lock semaphore mutex", "license": "ISC", "maintainer": null, "maintainer_email": null, "name": "python-etcd-lock", "package_url": "https://pypi.org/project/python-etcd-lock/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/python-etcd-lock/", "project_urls": { "Homepage": "https://github.com/appuri/python-etcd-lock" }, "release_url": "https://pypi.org/project/python-etcd-lock/0.0.4/", "requires_dist": null, "requires_python": null, "summary": "A distributed lock recipe for etcd", "version": "0.0.4" }, "last_serial": 1604025, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9373c5dbbb9db5be720f5fca3f24b184", "sha256": "181d8c4638cde81dd94087a6ceec204a65a65da0f33bf9c9411179a88023ec60" }, "downloads": -1, "filename": "python-etcd-lock-0.0.1.macosx-10.10-intel.tar.gz", "has_sig": false, "md5_digest": "9373c5dbbb9db5be720f5fca3f24b184", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1851, "upload_time": "2015-06-23T20:49:12", "url": "https://files.pythonhosted.org/packages/48/71/dde92e8483a4f7f9391075f1ca7f2e0dc531b2e2a8fbdf25901be1cf96f6/python-etcd-lock-0.0.1.macosx-10.10-intel.tar.gz" }, { "comment_text": "", "digests": { "md5": "460956ce6d98ab1dfa115ade21f2fd4e", "sha256": "4018854005ce0c9fbd77cd8e3d4f376af735bfc9c5b81ea3869c4cbf05f966b9" }, "downloads": -1, "filename": "python_etcd_lock-0.0.1-py2.7.egg", "has_sig": false, "md5_digest": "460956ce6d98ab1dfa115ade21f2fd4e", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 1989, "upload_time": "2015-06-23T20:49:20", "url": "https://files.pythonhosted.org/packages/f7/4b/5e9317c5124c4b884680c0674819622046406ed129e844960cb734949733/python_etcd_lock-0.0.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "e2cb3483df6ed949f2aa7ca1756cd68d", "sha256": "74bfdcc085174f9c8931a06c3e1bc0b4b922c7b68d5cabccc6ca912c096eeeab" }, "downloads": -1, "filename": "python-etcd-lock-0.0.1.tar.gz", "has_sig": false, "md5_digest": "e2cb3483df6ed949f2aa7ca1756cd68d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2044, "upload_time": "2015-06-23T20:49:16", "url": "https://files.pythonhosted.org/packages/54/16/73f5b11ff94bebd28b3af214606bf17701d59f1a4c4d0639a46ffbfc6856/python-etcd-lock-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "23e25b62b29018059d2093bdc218996e", "sha256": "a124d65373345b4c597d63ac9b0390e9e828314468391aaf8f40915844112389" }, "downloads": -1, "filename": "python_etcd_lock-0.0.2-py2.7.egg", "has_sig": false, "md5_digest": "23e25b62b29018059d2093bdc218996e", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 2011, "upload_time": "2015-06-23T21:25:01", "url": "https://files.pythonhosted.org/packages/0a/6f/b97293fb576848c1e10cf6c3a3ec7194955764aef3faac85a0e99b567d7d/python_etcd_lock-0.0.2-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "fe237b77755d03734ad553a37c315fa3", "sha256": "d7ecca02700479d502df1fac566f8fe3ecd7e0ea43c80eebed1b47737943da16" }, "downloads": -1, "filename": "python-etcd-lock-0.0.2.tar.gz", "has_sig": false, "md5_digest": "fe237b77755d03734ad553a37c315fa3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2281, "upload_time": "2015-06-23T21:24:58", "url": "https://files.pythonhosted.org/packages/6e/d7/9b67411ce9789870c0fc1d4f3595cf8313a0177f2f893d20514881708db8/python-etcd-lock-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "668d64d2cf43a946a00e3898c706a6b7", "sha256": "152e3148082118ae0a54c618fe0b083244f7f4505e715a798cdc87b10cf691c3" }, "downloads": -1, "filename": "python_etcd_lock-0.0.3-py2.7.egg", "has_sig": false, "md5_digest": "668d64d2cf43a946a00e3898c706a6b7", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 2011, "upload_time": "2015-06-23T23:23:19", "url": "https://files.pythonhosted.org/packages/3f/b0/3d7c0e43cc09068f943b7bdd9c4ab6650940086aa220cf5337fab0ddb21f/python_etcd_lock-0.0.3-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "0d0315cd762ad3917c5df4bdf4ed6319", "sha256": "6293d0d35cf82b6be03535656ce5baa3adb9518d2ca23371dce970ed32a2ac15" }, "downloads": -1, "filename": "python-etcd-lock-0.0.3.tar.gz", "has_sig": false, "md5_digest": "0d0315cd762ad3917c5df4bdf4ed6319", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2283, "upload_time": "2015-06-23T23:23:15", "url": "https://files.pythonhosted.org/packages/9e/27/fe49cd298707533fe1e5a2d9998f5f2f39e5ce477c5f5ee7eee0adb98227/python-etcd-lock-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "f5228af0755e903cc6e52ee829fad4ad", "sha256": "7daf5a633a9c56c9181eefc908fb8e3a0e025edaa7f80130d5e6df35c9508d28" }, "downloads": -1, "filename": "python_etcd_lock-0.0.4-py2.7.egg", "has_sig": false, "md5_digest": "f5228af0755e903cc6e52ee829fad4ad", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 6239, "upload_time": "2015-06-24T00:26:14", "url": "https://files.pythonhosted.org/packages/d4/26/457c958a899a4c831f12e9fcd70e62e34dbbe425efb5c1ca15b06a2ee087/python_etcd_lock-0.0.4-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "77123c63a6e99b74b7bb735d8aa5913c", "sha256": "99df4deb2b0d54b907b631292b65aa0d81b928af4f458be6fafcc4a3d5d91c8b" }, "downloads": -1, "filename": "python-etcd-lock-0.0.4.tar.gz", "has_sig": false, "md5_digest": "77123c63a6e99b74b7bb735d8aa5913c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3659, "upload_time": "2015-06-24T00:26:11", "url": "https://files.pythonhosted.org/packages/26/c4/798459d31bb41c3bc39e70f6f6cb3b676fc5e96b18552f9471ae57b4ad3b/python-etcd-lock-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f5228af0755e903cc6e52ee829fad4ad", "sha256": "7daf5a633a9c56c9181eefc908fb8e3a0e025edaa7f80130d5e6df35c9508d28" }, "downloads": -1, "filename": "python_etcd_lock-0.0.4-py2.7.egg", "has_sig": false, "md5_digest": "f5228af0755e903cc6e52ee829fad4ad", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 6239, "upload_time": "2015-06-24T00:26:14", "url": "https://files.pythonhosted.org/packages/d4/26/457c958a899a4c831f12e9fcd70e62e34dbbe425efb5c1ca15b06a2ee087/python_etcd_lock-0.0.4-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "77123c63a6e99b74b7bb735d8aa5913c", "sha256": "99df4deb2b0d54b907b631292b65aa0d81b928af4f458be6fafcc4a3d5d91c8b" }, "downloads": -1, "filename": "python-etcd-lock-0.0.4.tar.gz", "has_sig": false, "md5_digest": "77123c63a6e99b74b7bb735d8aa5913c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3659, "upload_time": "2015-06-24T00:26:11", "url": "https://files.pythonhosted.org/packages/26/c4/798459d31bb41c3bc39e70f6f6cb3b676fc5e96b18552f9471ae57b4ad3b/python-etcd-lock-0.0.4.tar.gz" } ] }