{ "info": { "author": "Anh Le", "author_email": "hi@imanhle.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# thread6\nSimple parallel processing interface for python\n\n## Why?\nPython's built in parallel processing and threading library is pretty simple to implement but sometimes you just want to chuck data at a function and make it run faster\n\n## Requirements\nPython 3+\n\n## Installation\n\n## Quickstart\nUse the `threaded` decorator to turn a method into a threaded method. That's it!\n```python\n@thread6.threaded()\ndef threaded_print():\n print(\"\")\n return 1\n```\n\nAlternatively, use `run_threaded` function\n```python\nthread6.run_threaded(threaded_print)\n```\n\nBoth the `threaded` decorator and `run_threaded` method will return an instance of\n`ResultThread`. This allow you to optionally wait for the function to finish executing \nand get the return value. To get the return value, use `.await_output()`\n```python\nresult = threaded_print()\nresult.await_output() # this will return 1\n```\n\nIf you have a function that needs to execute on a large list of data, use `run_chunked`\n```python\ndef update_items(items):\n ...\n\nitems = [...]\nthread6.run_chunked(update_items, items)\n```\n`.await_output()` also work with `run_chunked` but will return a list of return values instead\n\n## Usage\n\n\n## Todo\n- [x] threaded function decorator\n- [x] run something in a separate thread function\n- [x] split data into chunk and run in separate threads\n- [ ] add way for errors to fail loudly\n- [ ] auto spawn to run fx on a set of data\n- [ ] explore multi processing?\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/Haizzz/thread6", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "thread6", "package_url": "https://pypi.org/project/thread6/", "platform": "", "project_url": "https://pypi.org/project/thread6/", "project_urls": { "Homepage": "https://github.com/Haizzz/thread6" }, "release_url": "https://pypi.org/project/thread6/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "A plug n play multithreading interface", "version": "0.2.0" }, "last_serial": 4183484, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "d63080b4d13e6ff0edfc91f3585df86d", "sha256": "618037241f4a486940ca8e9c1f8cb0a476473c6036dc10a717c1ff5fbdabd7fc" }, "downloads": -1, "filename": "thread6-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d63080b4d13e6ff0edfc91f3585df86d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4199, "upload_time": "2018-08-18T16:35:21", "url": "https://files.pythonhosted.org/packages/f0/46/3a1220d4f933c1a2b4eba2d0d9306cac0ba0d758a9c3958a4213edba6866/thread6-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7b3d9b27b3e686a992e607541c0fc8a8", "sha256": "ed7a398e7f4d7fcedfcbc689ed3ef11179b040ead277ba15a6b316ff7d4d1b81" }, "downloads": -1, "filename": "thread6-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7b3d9b27b3e686a992e607541c0fc8a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3583, "upload_time": "2018-08-18T16:35:23", "url": "https://files.pythonhosted.org/packages/39/f2/cd7b53367c00a0e4a37c53c5b18007a50fb66f19331699c894c918230b8b/thread6-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d63080b4d13e6ff0edfc91f3585df86d", "sha256": "618037241f4a486940ca8e9c1f8cb0a476473c6036dc10a717c1ff5fbdabd7fc" }, "downloads": -1, "filename": "thread6-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d63080b4d13e6ff0edfc91f3585df86d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4199, "upload_time": "2018-08-18T16:35:21", "url": "https://files.pythonhosted.org/packages/f0/46/3a1220d4f933c1a2b4eba2d0d9306cac0ba0d758a9c3958a4213edba6866/thread6-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7b3d9b27b3e686a992e607541c0fc8a8", "sha256": "ed7a398e7f4d7fcedfcbc689ed3ef11179b040ead277ba15a6b316ff7d4d1b81" }, "downloads": -1, "filename": "thread6-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7b3d9b27b3e686a992e607541c0fc8a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3583, "upload_time": "2018-08-18T16:35:23", "url": "https://files.pythonhosted.org/packages/39/f2/cd7b53367c00a0e4a37c53c5b18007a50fb66f19331699c894c918230b8b/thread6-0.2.0.tar.gz" } ] }