{ "info": { "author": "Ruiqi Zhu", "author_email": "rickyzhu@foxmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython" ], "description": "# Reskeeper\n[![version](https://img.shields.io/static/v1.svg?label=version&message=0.1.1&color=blue)](https://github.com/qige96/reskeeper)\n[![docs](https://img.shields.io/static/v1.svg?label=docs&message=rtds&color=green)](https://reskeeper.readthedocs.io/en/latest/)\n\nA lightweight management system for applying and releasing exclusive resources.\n\n\n## Introduction\n\nConsidering these scenarios: you are doing web crapping that \nrequiring proxies with multi-threads, and each thread can only \nuse one proxy and one proxy can only be used by one thread at \none time; or you are doing monkey tests for login process of \nyour several applications at one time, each application can \nonly use one test account and each account can only be used \nby one application at one time. You will need to manage the \napplying and releasing of these **exclusive resources**, and \nhere is this little system taht can help.\n\n## Installation\nYou can install it by just one command\n```shell\npip install reskeeper\n```\nor\n```shell\ngit install git+https://github.com/qige96/reskeeper.git\n```\n\n## Quick Start\n\n```python\nfrom reskeeper import ResourceKeeper\n\nresources = [\n \"resource1\", \n \"resource2\",\n]\n\nrk = ResourceKeeper() # create a resource keeper instance\nrk.load(resources) # load a batch of data\n\nres1 = rk.get() # get a resource\nres2 = rk.get() # get one more resource\nres3 = rk.get() # None, no resource available\n\nprint(res1) # \nprint(res2.res_id, \n res2.data) # (2, \"resource2\")\nprint(res3) # None \n\nrk.release(res1) # release a resource\n\nres4 = rk.get() # one resource available\n\nprint(res4.to_dict()) # {'res_id': 1, 'data': 'resource1'}\n\n```\n\n## Documentation\n\nsee https://reskeeper.readthedocs.io\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/qige96/reskeeper", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "reskeeper", "package_url": "https://pypi.org/project/reskeeper/", "platform": "", "project_url": "https://pypi.org/project/reskeeper/", "project_urls": { "Homepage": "https://github.com/qige96/reskeeper" }, "release_url": "https://pypi.org/project/reskeeper/0.1.1/", "requires_dist": null, "requires_python": ">=3.6", "summary": "A lightweight management system for applying and releasing exclusive resources.", "version": "0.1.1" }, "last_serial": 5106598, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "1ac1aad5d89a1085fc915f99c8adbeb7", "sha256": "6be5198bdb72ca82c4570eff32d4d80a986b8184d0c31a0d28dfc739d94efc21" }, "downloads": -1, "filename": "reskeeper-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1ac1aad5d89a1085fc915f99c8adbeb7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 1176, "upload_time": "2019-04-06T05:39:43", "url": "https://files.pythonhosted.org/packages/4e/f3/6f732337f6da27580243f9c910f4e1b276e250aff5d0e58d676007689b5d/reskeeper-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "17ef68b85ae5a8928cc0f4181299eb53", "sha256": "414937939ea6d36f204b899ec6ae4f7610c729bc9150fce8077f512065e3c369" }, "downloads": -1, "filename": "reskeeper-0.1.tar.gz", "has_sig": false, "md5_digest": "17ef68b85ae5a8928cc0f4181299eb53", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 1051, "upload_time": "2019-04-06T05:39:48", "url": "https://files.pythonhosted.org/packages/65/01/c36b617ca00ab7b85d13ff58601d104cda4dfc9a2841404e21d17ad1be5e/reskeeper-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b0d4974ed169ba246a76a710ee6e8c01", "sha256": "6484c903d71870279d27f7c1fde9889b69881c8f41a656268682ab410b548d80" }, "downloads": -1, "filename": "reskeeper-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b0d4974ed169ba246a76a710ee6e8c01", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 1874, "upload_time": "2019-04-06T05:39:45", "url": "https://files.pythonhosted.org/packages/f9/79/20ef8b316a7824fc5862fcadcedf510d420517df708d8af3901f2f9f9a09/reskeeper-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f3a100d1cc088e59a76b24d7bbb2e857", "sha256": "6079244fc1b10e59e492a9be4cb521d3b32e61d0b6436095b97fea80471e22c8" }, "downloads": -1, "filename": "reskeeper-0.1.1.tar.gz", "has_sig": false, "md5_digest": "f3a100d1cc088e59a76b24d7bbb2e857", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 1724, "upload_time": "2019-04-06T05:39:47", "url": "https://files.pythonhosted.org/packages/e3/72/aa17a95ffa0698388a41db2e9a08bb39a4070cf244818f2f61d7f9342432/reskeeper-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b0d4974ed169ba246a76a710ee6e8c01", "sha256": "6484c903d71870279d27f7c1fde9889b69881c8f41a656268682ab410b548d80" }, "downloads": -1, "filename": "reskeeper-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b0d4974ed169ba246a76a710ee6e8c01", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 1874, "upload_time": "2019-04-06T05:39:45", "url": "https://files.pythonhosted.org/packages/f9/79/20ef8b316a7824fc5862fcadcedf510d420517df708d8af3901f2f9f9a09/reskeeper-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f3a100d1cc088e59a76b24d7bbb2e857", "sha256": "6079244fc1b10e59e492a9be4cb521d3b32e61d0b6436095b97fea80471e22c8" }, "downloads": -1, "filename": "reskeeper-0.1.1.tar.gz", "has_sig": false, "md5_digest": "f3a100d1cc088e59a76b24d7bbb2e857", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 1724, "upload_time": "2019-04-06T05:39:47", "url": "https://files.pythonhosted.org/packages/e3/72/aa17a95ffa0698388a41db2e9a08bb39a4070cf244818f2f61d7f9342432/reskeeper-0.1.1.tar.gz" } ] }