{ "info": { "author": "Siu-Kei Muk (David)", "author_email": "muksiukei@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# TinyPipe\n\n**TinyPipe** is a lightweight library that facilitates the application of the Pipeline Pattern. A pipeline has a general form as follows:\n\n```\n |---| |----| |- -| |----| |---|\n... -> | Q | -> | OP | -> | Q | -> | OP | -> | Q | -> ...\n |---| |----| |---| |----| |---|\n```\n\nAs data flows through the pipeline, it is first fed into the input queue (denoted as `Q` above). The following operation unit (`OP`) grabs it and produces a result, which is then fed into its output queue. This process continues until the data encounters a terminating `OP` which has no output queue.\n\nBuilding blocks are provided for pipeline construction, where each operation unit (represented by `Pipe`), owns a threads and runs individually. A `ParallelPipe` is also included for an operation to run with multiple threads. See the documentation for detail.\n\n## Setup\n\nPython version: 3.6+ (other versions not tested, feel free to try it out!)\n\nTo install **TinyPipe**:\n\n```bash\n$ pip install tinypipe\n```\n\n## Usage\n\nSuppose every data has to go through the functions `f1`, `f2`, and `f3` in sequence. The pipeline can be constructed by:\n\n```python\nimport tinypipe as tp\n\n# 1. Create pipeline\npipeline = tp.Pipeline()\n\n# 2. Append pipes to pipeline\nf1_pipe = tp.pipe.FunctionPipe(f1)\npipeline.append(f1_pipe)\n\nf2_pipe = tp.pipe.FunctionPipe(f2)\npipeline.append(f2_pipe)\n\nf3_pipe = tp.pipe.FunctionPipe(f3)\npipeline.append(f3_pipe)\n# One can call `pipeline.extend([f1_pipe, f2_pipe, f3_pipe])` instead\n\n# 3. Build & start the pipeline\n# Once the pipeline is started, it will keep trying to get data to process\n#\n# The following `pipeline.build()` call is optional. `pipeline.start()` will\n# make the call if it is not called.\n#\n# pipeline.build()\npipeline.start()\n\n# 5. Feed data into the pipeline\ndata_iterator = ...\nfor data in data_iterator:\n pipeline.put(data)\n\n# 6. If all the data has been passed into the pipeline,\n# wait for it to finish all the work.\npipeline.join()\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/dave-msk/tinypipe/archive/v0.1.2.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dave-msk/tinypipe", "keywords": "tinypipe,pipeline,multithread", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "tinypipe", "package_url": "https://pypi.org/project/tinypipe/", "platform": "", "project_url": "https://pypi.org/project/tinypipe/", "project_urls": { "Download": "https://github.com/dave-msk/tinypipe/archive/v0.1.2.tar.gz", "Homepage": "https://github.com/dave-msk/tinypipe" }, "release_url": "https://pypi.org/project/tinypipe/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Lightweight pipeline with multi-threaded operation units.", "version": "0.1.2", "yanked": false, "yanked_reason": null }, "last_serial": 6041351, "releases": { "0.1.0": [ { "comment_text": "/home/david/.pypirc", "digests": { "md5": "b18405dd9780fede61bb2adc28efa951", "sha256": "29852de7809c5b37b0849bc7e03a6c26208c26adc6f21e1d0a2794b0d2e63d3e" }, "downloads": -1, "filename": "tinypipe-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b18405dd9780fede61bb2adc28efa951", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10659, "upload_time": "2019-05-11T14:36:52", "upload_time_iso_8601": "2019-05-11T14:36:52.113503Z", "url": "https://files.pythonhosted.org/packages/41/b1/dd34c18cdd5b0272817ed2a7b0b6e9d71c23d9ad9f9d13d8818de3180ae4/tinypipe-0.1.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "/home/david/.pypirc", "digests": { "md5": "89d3dbd762ceecc2098be0addf80cfb9", "sha256": "94d5442eefd67a12c0ed71ac05e5ab3fd8b1664365df295985c64f2137796bc1" }, "downloads": -1, "filename": "tinypipe-0.1.0.tar.gz", "has_sig": false, "md5_digest": "89d3dbd762ceecc2098be0addf80cfb9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4905, "upload_time": "2019-05-11T14:36:54", "upload_time_iso_8601": "2019-05-11T14:36:54.123951Z", "url": "https://files.pythonhosted.org/packages/28/3d/d011ec2a45488f8dec4ac1b84339276268066b616f4e9bc395ac524068dd/tinypipe-0.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.1": [ { "comment_text": "/home/david/.pypirc", "digests": { "md5": "9ff2c9a02907703bcd015af1d3cd3c4b", "sha256": "e564835ae740a47fb728577bb09fa11529006900bc241db89a17473499cf36df" }, "downloads": -1, "filename": "tinypipe-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "9ff2c9a02907703bcd015af1d3cd3c4b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12782, "upload_time": "2019-08-26T13:00:04", "upload_time_iso_8601": "2019-08-26T13:00:04.303031Z", "url": "https://files.pythonhosted.org/packages/de/4c/7941bd6d1a802eba1cc887cdace398a9cdefd7ba6448ed719fbcb33a9962/tinypipe-0.1.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "/home/david/.pypirc", "digests": { "md5": "2c852c2b385aafb76180e341e40422c8", "sha256": "20afcd7ae82050f2a9d3e1faaf77b4aa36e196a89f32f7f1011cdcfafc8a55ca" }, "downloads": -1, "filename": "tinypipe-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2c852c2b385aafb76180e341e40422c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6617, "upload_time": "2019-08-26T13:00:06", "upload_time_iso_8601": "2019-08-26T13:00:06.068197Z", "url": "https://files.pythonhosted.org/packages/e7/83/841012822180bb54ed221758716bd3b018d712abb6127d19a73cc4251be6/tinypipe-0.1.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.2": [ { "comment_text": "/home/david/.pypirc", "digests": { "md5": "9061ea0c2eba88149109d46ec70cc083", "sha256": "1e3d350e99ffda215866b46e6435593b212b5600049baffb99653bb2b82606ab" }, "downloads": -1, "filename": "tinypipe-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "9061ea0c2eba88149109d46ec70cc083", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13638, "upload_time": "2019-10-28T13:08:31", "upload_time_iso_8601": "2019-10-28T13:08:31.450786Z", "url": "https://files.pythonhosted.org/packages/99/94/a50f7407cc9b6618dd18f1aa06bf07730388a49c66e24c185a6034752464/tinypipe-0.1.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "/home/david/.pypirc", "digests": { "md5": "34aebefefdbea935fd6d2373de2d14a4", "sha256": "eecf2fa9e823d7641df010334e4a4ea6d879c2f870ac9f6242078798e88cf1d3" }, "downloads": -1, "filename": "tinypipe-0.1.2.tar.gz", "has_sig": false, "md5_digest": "34aebefefdbea935fd6d2373de2d14a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6988, "upload_time": "2019-10-28T13:08:33", "upload_time_iso_8601": "2019-10-28T13:08:33.213604Z", "url": "https://files.pythonhosted.org/packages/fa/73/210f350ee18edb96de787de91b8cb294d64dde5872264ffa3628532c76e0/tinypipe-0.1.2.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "/home/david/.pypirc", "digests": { "md5": "9061ea0c2eba88149109d46ec70cc083", "sha256": "1e3d350e99ffda215866b46e6435593b212b5600049baffb99653bb2b82606ab" }, "downloads": -1, "filename": "tinypipe-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "9061ea0c2eba88149109d46ec70cc083", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13638, "upload_time": "2019-10-28T13:08:31", "upload_time_iso_8601": "2019-10-28T13:08:31.450786Z", "url": "https://files.pythonhosted.org/packages/99/94/a50f7407cc9b6618dd18f1aa06bf07730388a49c66e24c185a6034752464/tinypipe-0.1.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "/home/david/.pypirc", "digests": { "md5": "34aebefefdbea935fd6d2373de2d14a4", "sha256": "eecf2fa9e823d7641df010334e4a4ea6d879c2f870ac9f6242078798e88cf1d3" }, "downloads": -1, "filename": "tinypipe-0.1.2.tar.gz", "has_sig": false, "md5_digest": "34aebefefdbea935fd6d2373de2d14a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6988, "upload_time": "2019-10-28T13:08:33", "upload_time_iso_8601": "2019-10-28T13:08:33.213604Z", "url": "https://files.pythonhosted.org/packages/fa/73/210f350ee18edb96de787de91b8cb294d64dde5872264ffa3628532c76e0/tinypipe-0.1.2.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }