{ "info": { "author": "Santiago Basulto", "author_email": "santiago.basulto@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# parallel\n\n> Bringing _parallelism_ closer to humans \u2728\n\n\n**Important**: `parallel` is in an early stage. All questions and suggestions are welcome. Please [submit an issue](https://github.com/santiagobasulto/parallel/issues).\n\n### Getting started\n\nInstall:\n\n```bash\n$ pip install python-parallel\n```\n\n_Parallelize_:\n\n```python\n@parallel.decorate\ndef download_and_store(url):\n resp = requests.get(url)\n result = store_in_db(resp.json())\n return result\n\nresults = download_and_store.map([\n 'https://python.org',\n 'https://python-requests.com',\n 'https://rmotr.com'\n], timeout=5, max_workers=4)\n```\n\nThere are more features to `parallel`:\n* Advanced argument passing (named arguments, extras).\n* Failed tasks and a silent mode.\n* An Async API (with context managers).\n* Automatic retries\n* Choose between multithreading and multiprocessing with a simple attribute `thread` & `process`.\n\nCheck the docs at [https://python-parallel.readthedocs.io/en/latest/](https://python-parallel.readthedocs.io/en/latest/).\n\n## Quick Docs\n\n`parallel` simplifies the process of _parallelizing_ tasks in your python code. Sometimes, you have a function that you want to invoke multiple times in parallel with different arguments (as the example above).\n\nIn some other occasions, you want to execute multiple functions in parallel. Example:\n\n```python\n@parallel.decorated\ndef get_price_bitstamp(crypto):\n pass\n\n@parallel.decorated\ndef get_price_bitfinex(crypto):\n pass\n\n@parallel.decorated\ndef get_price_coinbase(crypto):\n pass\n\nprices = parallel.par({\n 'stamp': get_price_bitstamp.future(crypto='BTC'),\n 'finex': get_price_bitfinex.future(crypto='BTC'),\n 'base': get_price_coinbase.future(crypto='BTC'),\n})\n\n# prices is a dict-like structure\nprint(\"Price of Bitstamp: {}\".format(prices['stamp']))\nprint(\"Price of Coinbase: {}\".format(prices['base']))\n```\n\n## Contributing\n\nRun tests\n\n```bash\n$ pip install -r dev-requirements.txt\n$ py.test -n 4 tests/\n```\n\nWrite & build docs:\n```bash\n$ python docs/live_docs.py\n```\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/santiagobasulto/parallel", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "python-parallel", "package_url": "https://pypi.org/project/python-parallel/", "platform": "", "project_url": "https://pypi.org/project/python-parallel/", "project_urls": { "Homepage": "https://github.com/santiagobasulto/parallel" }, "release_url": "https://pypi.org/project/python-parallel/0.0.2/", "requires_dist": null, "requires_python": ">=3.5", "summary": "Simple parallelism for the everyday developer", "version": "0.0.2" }, "last_serial": 5445407, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "d419a52715600665bd7ef624f34e2aaa", "sha256": "527a65608d61762f828a46c315c8e3802b9df629a738c075051931b676ef43a0" }, "downloads": -1, "filename": "python_parallel-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "d419a52715600665bd7ef624f34e2aaa", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 4261, "upload_time": "2019-05-30T18:56:31", "url": "https://files.pythonhosted.org/packages/16/7a/d367ce56c9852739bf13f7f6eb659f3662be9a187591655d84545b0ff98e/python_parallel-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a0428f130b716020cf918a3d317f206f", "sha256": "2bcc03e5cec6b4d605cccc4de9eb94ea9d28ae6e3826bdd1f08b621446147f76" }, "downloads": -1, "filename": "python-parallel-0.0.1.tar.gz", "has_sig": false, "md5_digest": "a0428f130b716020cf918a3d317f206f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 3894, "upload_time": "2019-05-30T18:56:33", "url": "https://files.pythonhosted.org/packages/59/36/a39be0b211b9d60de85060559309236d33d7f2d5e4af6ddf645921d2e699/python-parallel-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "e572d0acb2b74ab5db53b24db99f167e", "sha256": "61eef10d113aaf924206f5987d805fadc639cfae16e570d2244f2ae87cfb0f8b" }, "downloads": -1, "filename": "python_parallel-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "e572d0acb2b74ab5db53b24db99f167e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 5070, "upload_time": "2019-06-25T12:41:32", "url": "https://files.pythonhosted.org/packages/dc/cd/ee93f1016a7a3ac59287261dbc80d2b2577779d26094ad2e8c546aaa3a04/python_parallel-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8ca6385795dec4fd7d280dbaae4679c2", "sha256": "44b7d4e076842ab9dd6cdd4160077915934a58eab377ed14ae3f2b505f4d6704" }, "downloads": -1, "filename": "python-parallel-0.0.2.tar.gz", "has_sig": false, "md5_digest": "8ca6385795dec4fd7d280dbaae4679c2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 4894, "upload_time": "2019-06-25T12:41:34", "url": "https://files.pythonhosted.org/packages/2f/40/451a65633f40361d426c5339813b3c8d5a74018d01c51f42e60f8c27f319/python-parallel-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e572d0acb2b74ab5db53b24db99f167e", "sha256": "61eef10d113aaf924206f5987d805fadc639cfae16e570d2244f2ae87cfb0f8b" }, "downloads": -1, "filename": "python_parallel-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "e572d0acb2b74ab5db53b24db99f167e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 5070, "upload_time": "2019-06-25T12:41:32", "url": "https://files.pythonhosted.org/packages/dc/cd/ee93f1016a7a3ac59287261dbc80d2b2577779d26094ad2e8c546aaa3a04/python_parallel-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8ca6385795dec4fd7d280dbaae4679c2", "sha256": "44b7d4e076842ab9dd6cdd4160077915934a58eab377ed14ae3f2b505f4d6704" }, "downloads": -1, "filename": "python-parallel-0.0.2.tar.gz", "has_sig": false, "md5_digest": "8ca6385795dec4fd7d280dbaae4679c2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 4894, "upload_time": "2019-06-25T12:41:34", "url": "https://files.pythonhosted.org/packages/2f/40/451a65633f40361d426c5339813b3c8d5a74018d01c51f42e60f8c27f319/python-parallel-0.0.2.tar.gz" } ] }