{ "info": { "author": "Betalun", "author_email": "betalun@qq.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "\n# Background2 : run stuff in the backround \n--- \nthis is a fork from [kennethreitz/background](https://github.com/kennethreitz/background.git) \n\nThe main purpose is add multi instance to background \n\n```\nimport background2\nimport time\n\nbg1 = background2.Background()\n\nbg2 = background2.Background()\n\n@bg1.task\ndef work1(param1,param2):\n print('task1:work1')\n time.sleep(3)\n return 'task1:work1:{}-{}'.format(param1,param2)\n\n@bg2.task\ndef work2():\n print('task2:work2')\n time.sleep(3)\n return 'task2:work2'\n\n@bg1.callback\ndef back1(future):\n print('back1 for task1')\n\n\n@bg2.callback\ndef back2(future):\n print('back2 for task2')\n\ndef test_background():\n work1('1','2')\n work2()\n\ndef common():\n print('common function')\n\nif __name__ == '__main__':\n test_background()\n common()\n``` \n### install \n```pip install background2``` \nor \nclone the project and ``` python setup.py install ```\n\n--- \nsuggestion and pull request are welcome \n\n\n\n\nLICENSE:MIT\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/beeeta/background", "keywords": "", "license": "ISC", "maintainer": "", "maintainer_email": "", "name": "background2", "package_url": "https://pypi.org/project/background2/", "platform": "", "project_url": "https://pypi.org/project/background2/", "project_urls": { "Homepage": "https://github.com/beeeta/background" }, "release_url": "https://pypi.org/project/background2/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "It does what it says it does.", "version": "0.1.1" }, "last_serial": 4259863, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "59bf0940ecf663a8279827f67d0e0d45", "sha256": "1ebc16aa3e541ee0034f13c3712ae79119c984dc76ba2a8368675fc884bdbe02" }, "downloads": -1, "filename": "background2-0.1.1.tar.gz", "has_sig": false, "md5_digest": "59bf0940ecf663a8279827f67d0e0d45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3103, "upload_time": "2018-09-11T03:27:17", "url": "https://files.pythonhosted.org/packages/5e/56/d7d23d767adbd7e105ec3e4c400d6b0b4f53e2cef18f3c1dbb5b1e00be91/background2-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "59bf0940ecf663a8279827f67d0e0d45", "sha256": "1ebc16aa3e541ee0034f13c3712ae79119c984dc76ba2a8368675fc884bdbe02" }, "downloads": -1, "filename": "background2-0.1.1.tar.gz", "has_sig": false, "md5_digest": "59bf0940ecf663a8279827f67d0e0d45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3103, "upload_time": "2018-09-11T03:27:17", "url": "https://files.pythonhosted.org/packages/5e/56/d7d23d767adbd7e105ec3e4c400d6b0b4f53e2cef18f3c1dbb5b1e00be91/background2-0.1.1.tar.gz" } ] }