{ "info": { "author": "Emlyn O'Regan", "author_email": "emlynoregan@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Distributed Computing" ], "description": "# im_critsec\n\nThis library contains the decorator @critsec, for running a function as a critical section (non-reentrant task).\n\n[![Build Status](https://travis-ci.org/emlynoregan/im_critsec.svg?branch=master)](https://travis-ci.org/emlynoregan/im_critsec)\n\n## Install \n\nUse the python package for this library. You can find the package online [here](https://pypi.org/project/im-critsec/).\n\nChange to your Python App Engine project's root folder and do the following:\n\n> pip install im_critsec --target lib\n\nOr add it to your requirements.txt. You'll also need to set up vendoring, see [app engine vendoring instructions here](https://cloud.google.com/appengine/docs/python/tools/using-libraries-python-27).\n\n## Usage\n\nYou'll need to have im_task set up correctly using either im_task_flask or im_task_webapp (or both!) depending on which framework you are using.\n\nThen, you can run a function as a critical section as follows:\n\n @critsec\n def MyCriticalFunc():\n # do some stuff that needs to not be interrupted\n # this function will *never* run re-entrantly, even in other processes on other computers\n\n MyCriticalFunc() # kicking off the call to it here.\n\nCritsec forms a separate critical section for each combination of arguments and outer scope references. eg:\n\n @critsec\n def MyCriticalFunc(value):\n # do some stuff that needs to not be interrupted\n # this function will *never* run re-entrantly, even in other processes on other computers\n\n MyCriticalFunc(1) # first call\n MyCriticalFunc(1) # in same critical section as first call\n MyCriticalFunc(2) # in a different critical section\n\n## rerun_on_skip\n\nWhen a critical section is entered, subsequent calls to the same critical section will be ignored while that critical section is running. However, those skipped calls are remembered. Once the critical section is finished, if any calls were skipped, then the critical section runs one more time. This is called rerun_on_skip.\n\nIf you would prefer not to have rerun_on_skip, you can turn it off:\n\n @critsec(rerun_on_skip = False)\n def ThisFunctionIsNotRerunOnSkip(value):\n # do a thing \n\n## @critsec is a form of @task\n\n@critsec is exactly like @task; you can pass in task arguments, eg:\n\n @critsec(queue = \"myqueue\")\n def ThisFunctionRunsOnMyQueue():\n # do a thing \n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/emlynoregan/im_task", "keywords": "", "license": "../LICENSE.txt", "maintainer": "", "maintainer_email": "", "name": "im-critsec", "package_url": "https://pypi.org/project/im-critsec/", "platform": "", "project_url": "https://pypi.org/project/im-critsec/", "project_urls": { "Homepage": "https://github.com/emlynoregan/im_task" }, "release_url": "https://pypi.org/project/im-critsec/0.0.4/", "requires_dist": [ "im-util", "im-task" ], "requires_python": "", "summary": "@critsec and @debouncedcritsec for google app engine, python standard environment", "version": "0.0.4" }, "last_serial": 3874874, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "be6cba6bbed53dfc570a2edb387d2d59", "sha256": "cd28354e0990a57f568c52bc15e95c1e05355e078f81e216ad58b2346e070e40" }, "downloads": -1, "filename": "im_critsec-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "be6cba6bbed53dfc570a2edb387d2d59", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3932, "upload_time": "2018-05-18T03:13:37", "url": "https://files.pythonhosted.org/packages/c7/4f/df9749fcdb435d18ecdbe1f291354b2f03415ce0ec910b155735f4c32c7c/im_critsec-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "de9c5b6b20b5726e6183d82f3861c66b", "sha256": "8793e62d64a3f3f4b826cb9cc6bfea38307849a6829e74a8e83f895c69e2d7d9" }, "downloads": -1, "filename": "im_critsec-0.0.1.tar.gz", "has_sig": false, "md5_digest": "de9c5b6b20b5726e6183d82f3861c66b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2610, "upload_time": "2018-05-18T03:13:38", "url": "https://files.pythonhosted.org/packages/a1/00/4478f79b158463e10e2b25069db3fa68d569422ad2e32ac128704d52b2c3/im_critsec-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "3ab2790e1801b6095137c801cd2cb782", "sha256": "221e3077d2c8225e076ec6f8da4449b401063dfd099f427c32dba081e5214186" }, "downloads": -1, "filename": "im_critsec-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3ab2790e1801b6095137c801cd2cb782", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4186, "upload_time": "2018-05-18T04:24:54", "url": "https://files.pythonhosted.org/packages/4e/9b/eea3ebde66c2dc725ec425c05b5842f480ff10b4d15b1bcd123c5964be85/im_critsec-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "32236f2dafe5d850b974174c6e1e4509", "sha256": "d9b615bbda001354eddfa1e4940b6062301eb8113ca8b2bbb2c850c0d6dfd6a7" }, "downloads": -1, "filename": "im_critsec-0.0.2.tar.gz", "has_sig": false, "md5_digest": "32236f2dafe5d850b974174c6e1e4509", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2869, "upload_time": "2018-05-18T04:24:55", "url": "https://files.pythonhosted.org/packages/5a/d1/cdcb4142a65f039f209b3109882c2b884a886d6af966d5142f9de7c6a77f/im_critsec-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "5789aac4b5772962aa0bc0620d0b859a", "sha256": "90685366fbfa4010a0971b6388ed0e9922512d1b8fa96b263a8448a57799f7ce" }, "downloads": -1, "filename": "im_critsec-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5789aac4b5772962aa0bc0620d0b859a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6072, "upload_time": "2018-05-18T05:10:27", "url": "https://files.pythonhosted.org/packages/6b/2c/915a2b584dcbcb42634affc4c5e55c803d272cf148441872165384ea05eb/im_critsec-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3102f260fe8d23a4b60cc8af76861076", "sha256": "130a35a12f1b078d649bba7d8ed8f148d93f7426e37a6d34461585150cc2b0fe" }, "downloads": -1, "filename": "im_critsec-0.0.3.tar.gz", "has_sig": false, "md5_digest": "3102f260fe8d23a4b60cc8af76861076", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3854, "upload_time": "2018-05-18T05:10:29", "url": "https://files.pythonhosted.org/packages/e3/1d/411a79da135cf537604947324ae6d2b80c3bf53cb79fd050194cdb7eaa00/im_critsec-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "b94bed26ed9ef25f0ccefe7175912d17", "sha256": "68589b88dd1c7e73766987682a4a6ceeddda54db1c34a40f29361064e4e7f938" }, "downloads": -1, "filename": "im_critsec-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b94bed26ed9ef25f0ccefe7175912d17", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6080, "upload_time": "2018-05-18T06:10:40", "url": "https://files.pythonhosted.org/packages/47/53/cbc1b463a1087fab6ada7ecd48f0056aaa87d1d09ada8dcd6df2da6c1c0e/im_critsec-0.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b1541bfae92d11a288033d464e7392e0", "sha256": "537527011e25b81624b8e654b9345e8c93158aeaa421232a0c63be0455a83880" }, "downloads": -1, "filename": "im_critsec-0.0.4.tar.gz", "has_sig": false, "md5_digest": "b1541bfae92d11a288033d464e7392e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3850, "upload_time": "2018-05-18T06:10:41", "url": "https://files.pythonhosted.org/packages/bb/a9/ae7cd2a83d31173632bebf3582493ced366d9e9e0f87fc77334ec4c19809/im_critsec-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b94bed26ed9ef25f0ccefe7175912d17", "sha256": "68589b88dd1c7e73766987682a4a6ceeddda54db1c34a40f29361064e4e7f938" }, "downloads": -1, "filename": "im_critsec-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b94bed26ed9ef25f0ccefe7175912d17", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6080, "upload_time": "2018-05-18T06:10:40", "url": "https://files.pythonhosted.org/packages/47/53/cbc1b463a1087fab6ada7ecd48f0056aaa87d1d09ada8dcd6df2da6c1c0e/im_critsec-0.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b1541bfae92d11a288033d464e7392e0", "sha256": "537527011e25b81624b8e654b9345e8c93158aeaa421232a0c63be0455a83880" }, "downloads": -1, "filename": "im_critsec-0.0.4.tar.gz", "has_sig": false, "md5_digest": "b1541bfae92d11a288033d464e7392e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3850, "upload_time": "2018-05-18T06:10:41", "url": "https://files.pythonhosted.org/packages/bb/a9/ae7cd2a83d31173632bebf3582493ced366d9e9e0f87fc77334ec4c19809/im_critsec-0.0.4.tar.gz" } ] }