{ "info": { "author": "Mick Koch", "author_email": "mick@kochm.co", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only" ], "description": "# aiopipe -- Multiprocess communication pipes for asyncio\n\n[![Documentation](https://img.shields.io/badge/documentation-blue.svg)](https://kchmck.github.io/aiopipe/aiopipe/)\n[![Build status](https://img.shields.io/circleci/project/github/kchmck/aiopipe/master.svg)](https://circleci.com/gh/kchmck/aiopipe)\n\nThis package wraps the [`os.pipe`](https://docs.python.org/3/library/os.html#os.pipe)\nsimplex communication pipe so it can be used as part of the non-blocking\n[`asyncio`](https://docs.python.org/3/library/asyncio.html) event loop. A duplex pipe\nis also provided, which allows reading and writing on both ends.\n\n## Simplex example\n\nThe following example opens a pipe with the write end in the child process and the read\nend in the parent process.\n\n```python\n>>> from multiprocessing import Process\n>>> import asyncio\n>>>\n>>> from aiopipe import aiopipe\n>>>\n>>> async def main():\n... rx, tx = aiopipe()\n...\n... with tx.detach() as tx:\n... proc = Process(target=childproc, args=(tx,))\n... proc.start()\n...\n... # The write end is now available in the child process\n... # and detached from the parent process.\n...\n... async with rx.open() as rx:\n... msg = await rx.readline()\n...\n... proc.join()\n... return msg\n>>>\n>>> def childproc(tx):\n... asyncio.run(childtask(tx))\n>>>\n>>> async def childtask(tx):\n... async with tx.open() as tx:\n... tx.write(b\"hi from the child process\\n\")\n>>>\n>>> asyncio.run(main())\nb'hi from the child process\\n'\n>>>\n```\n\n## Duplex example\n\nThe following example shows a parent and child process sharing a duplex pipe to exchange\nmessages.\n\n```python\n>>> from multiprocessing import Process\n>>> import asyncio\n>>>\n>>> from aiopipe import aioduplex\n>>>\n>>> async def main():\n... mainpipe, chpipe = aioduplex()\n...\n... with chpipe.detach() as chpipe:\n... proc = Process(target=childproc, args=(chpipe,))\n... proc.start()\n...\n... # The second pipe is now available in the child process\n... # and detached from the parent process.\n...\n... async with mainpipe.open() as (rx, tx):\n... req = await rx.read(5)\n... tx.write(req + b\" world\\n\")\n... msg = await rx.readline()\n...\n... proc.join()\n... return msg\n>>>\n>>> def childproc(pipe):\n... asyncio.run(childtask(pipe))\n>>>\n>>> async def childtask(pipe):\n... async with pipe.open() as (rx, tx):\n... tx.write(b\"hello\")\n... rep = await rx.readline()\n... tx.write(rep.upper())\n>>>\n>>> asyncio.run(main())\nb'HELLO WORLD\\n'\n>>>\n```\n\n## Installation\n\nThis package requires Python 3.7+ and can be installed with `pip`:\n```\npip install aiopipe\n```\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/kchmck/aiopipe", "keywords": "async,asyncio,pipe,os.pipe,duplex", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "aiopipe", "package_url": "https://pypi.org/project/aiopipe/", "platform": "", "project_url": "https://pypi.org/project/aiopipe/", "project_urls": { "Documentation": "https://kchmck.github.io/aiopipe/aiopipe/", "Homepage": "https://github.com/kchmck/aiopipe" }, "release_url": "https://pypi.org/project/aiopipe/0.2.2/", "requires_dist": [ "tox (~=3.9) ; extra == 'dev'" ], "requires_python": "~=3.7", "summary": "Multiprocess communication pipes for asyncio", "version": "0.2.2" }, "last_serial": 5986938, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "eb24f15394a89e09e74a093b3ea8f259", "sha256": "5051c335b8bcbdfd4e2318dd445d4e1c7b3a30802457b2ec1490a24117fa00b9" }, "downloads": -1, "filename": "aiopipe-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "eb24f15394a89e09e74a093b3ea8f259", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3603, "upload_time": "2017-07-27T15:52:48", "url": "https://files.pythonhosted.org/packages/71/6d/eb6315ace7f6fa5ea4551d259fdce9aceff775a7de8db490311a2ce1623d/aiopipe-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b22a0d075041bec19f82bdd13658795d", "sha256": "b97ec3f0457558aefdd5784d9f094f57927c6e34f80851c89ae09642856341de" }, "downloads": -1, "filename": "aiopipe-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b22a0d075041bec19f82bdd13658795d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2311, "upload_time": "2017-07-27T15:52:49", "url": "https://files.pythonhosted.org/packages/02/77/9257f2103a7a37ff2ee0b9dca5776c1a812a733cd3336f1eb554aaa01756/aiopipe-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "2f36e93c138358af36cf09b12aebe75b", "sha256": "ba1a47221a0def5f1742863b1d8a8fc97440a67f89df5d35281b1334dea28735" }, "downloads": -1, "filename": "aiopipe-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "2f36e93c138358af36cf09b12aebe75b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3626, "upload_time": "2017-07-27T15:54:32", "url": "https://files.pythonhosted.org/packages/2e/4e/0966a7d68818588533eeb36195711c93fbe092123bd2e9d932f1d06d05cf/aiopipe-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "811099d588f8c4b90c959078ed7415a1", "sha256": "b1d0a5007ccdd5cb3eeaa0956b3e86b7c70d3e3f7f3896e20008c3cf039746c7" }, "downloads": -1, "filename": "aiopipe-0.1.1.tar.gz", "has_sig": false, "md5_digest": "811099d588f8c4b90c959078ed7415a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2297, "upload_time": "2017-07-27T15:54:33", "url": "https://files.pythonhosted.org/packages/20/8f/6ab247a7260a46033d58382e2ac38c7365a44167b1b87c6995850ba9764d/aiopipe-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "4079b8eb5a4563efb003e3cfc6407734", "sha256": "0f809ecc834045c273986b9ab5e810635e2bcccfa4f0765d830042b6133efe55" }, "downloads": -1, "filename": "aiopipe-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "4079b8eb5a4563efb003e3cfc6407734", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3313, "upload_time": "2018-08-01T22:21:35", "url": "https://files.pythonhosted.org/packages/46/26/2fe487940065f307bf0fea6e07a3c79ef1484d52ab75be7731c9a2df4561/aiopipe-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "234cc20b5b31ed5b497fb64e1b17b5d9", "sha256": "cb42864ee76aaf7b688eb34968f86085bac8438c8b8a917fff0ced8ab78ec2f1" }, "downloads": -1, "filename": "aiopipe-0.1.2.tar.gz", "has_sig": false, "md5_digest": "234cc20b5b31ed5b497fb64e1b17b5d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2651, "upload_time": "2018-08-01T22:21:36", "url": "https://files.pythonhosted.org/packages/bd/f5/432af953945b2bcbfed1d8fc890c3cb79b64c64b88a747f7a9ffd3b67883/aiopipe-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "2ede5ec39be6e1bc69de353bee8288d1", "sha256": "08e9c96237b38ada67dfba7bd50b3e69d63b58abd8460fceb3108d2038077cbc" }, "downloads": -1, "filename": "aiopipe-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "2ede5ec39be6e1bc69de353bee8288d1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 3312, "upload_time": "2018-10-19T17:39:48", "url": "https://files.pythonhosted.org/packages/10/eb/6e33b25b42e7a08ef67c555840d2944a3789b1349b8182e342a1a086d7ac/aiopipe-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "004f077610664d02cc4de9810bd027e6", "sha256": "9a78875e525f8a4f6972339443742292bc49828ce83bae8f5059059961e27553" }, "downloads": -1, "filename": "aiopipe-0.1.3.tar.gz", "has_sig": false, "md5_digest": "004f077610664d02cc4de9810bd027e6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 2667, "upload_time": "2018-10-19T17:39:49", "url": "https://files.pythonhosted.org/packages/58/c0/96f036b2704ce9d6d042d268f1a32238239e791ea12e2e4e63cb868eedd8/aiopipe-0.1.3.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "38db9da98604faa3bff50c1cfd837aa9", "sha256": "e354636bf9d11e1545b2a0786453651dbb031ff78e1daebbcacbc00ec77efdb8" }, "downloads": -1, "filename": "aiopipe-0.2.0-py3-none-any.whl", "has_sig": true, "md5_digest": "38db9da98604faa3bff50c1cfd837aa9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.7", "size": 4409, "upload_time": "2019-10-03T23:58:26", "url": "https://files.pythonhosted.org/packages/54/34/11b01bba2a602eee9fee7dd8418de71a08c5bdf8e03e51bd2158f5990947/aiopipe-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b36a0fd4cce3d391f90098b4456e2434", "sha256": "ab817d8845d824d14fecc5e57bf76fbad49127276ed11572c2d1640afeaec132" }, "downloads": -1, "filename": "aiopipe-0.2.0.tar.gz", "has_sig": true, "md5_digest": "b36a0fd4cce3d391f90098b4456e2434", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.7", "size": 4134, "upload_time": "2019-10-03T23:58:28", "url": "https://files.pythonhosted.org/packages/fa/f2/f135583e3076600dfeee69e93deacc2193b82a4cdeab858eb39a9dcfdf57/aiopipe-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "d9a2f41eaaf83e04f029cad066336b59", "sha256": "b3445d43388c230952e75aedaf53f3a903445c31cf9aa03268df57b2b1b1a073" }, "downloads": -1, "filename": "aiopipe-0.2.1-py3-none-any.whl", "has_sig": true, "md5_digest": "d9a2f41eaaf83e04f029cad066336b59", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.7", "size": 5195, "upload_time": "2019-10-04T00:03:46", "url": "https://files.pythonhosted.org/packages/1c/94/8c249424bb822e68137f3c87c4a15e1ff4fface63564c2f498f839d6d770/aiopipe-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e856b30129418e2b5fc13028c38294a9", "sha256": "846b6c6730ec13316bc839392384880ba478a8ee48f8f6993a2fb1d0a8fbe584" }, "downloads": -1, "filename": "aiopipe-0.2.1.tar.gz", "has_sig": true, "md5_digest": "e856b30129418e2b5fc13028c38294a9", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.7", "size": 4451, "upload_time": "2019-10-04T00:03:48", "url": "https://files.pythonhosted.org/packages/00/04/ce13f0c7f203709c974e13fbd4439b682b0d650a62110eadcde09089d527/aiopipe-0.2.1.tar.gz" } ], "0.2.1rc0": [ { "comment_text": "", "digests": { "md5": "2548bd73d9db00941e9ea4b6770c0adc", "sha256": "742c6c67274bd145e68cce69f72452a3b4c1590d4514ed690d6a957374215635" }, "downloads": -1, "filename": "aiopipe-0.2.1rc0-py3-none-any.whl", "has_sig": true, "md5_digest": "2548bd73d9db00941e9ea4b6770c0adc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.7", "size": 5231, "upload_time": "2019-10-04T00:01:12", "url": "https://files.pythonhosted.org/packages/a9/9f/d7f2e53c85304f46bacd79dc5a2ad8105b1fd2b4820297f76116316b53af/aiopipe-0.2.1rc0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d47a7ba273764897ca391a0d69e70dd2", "sha256": "1425dc43e136b351bdfb6c5dce6939f2ef7a280ed5ad4b47dd08d755b8049006" }, "downloads": -1, "filename": "aiopipe-0.2.1rc0.tar.gz", "has_sig": true, "md5_digest": "d47a7ba273764897ca391a0d69e70dd2", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.7", "size": 4458, "upload_time": "2019-10-04T00:01:14", "url": "https://files.pythonhosted.org/packages/09/8c/a6f1f91d5be3497e9cb1ce8d41682bacd01f3a1acb2da4464caf568ee702/aiopipe-0.2.1rc0.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "6bec50677c380b7da3e23e1065e2efd3", "sha256": "4796341a4352167452e436f77696e5596ebf9728eb4e4adbc02c8bb66d3349ed" }, "downloads": -1, "filename": "aiopipe-0.2.2-py3-none-any.whl", "has_sig": true, "md5_digest": "6bec50677c380b7da3e23e1065e2efd3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.7", "size": 5129, "upload_time": "2019-10-17T00:02:32", "url": "https://files.pythonhosted.org/packages/7e/0d/aaf3fd512ca381c418ce776ea087c1ce4bf37eaf9711a83f336c2e695d97/aiopipe-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "306c9de1db9ecea53298e354e4a7f890", "sha256": "666282e6e94b8bbd3a49330cd5d4ac95dc217a0d7c2597fb3f43753893a3154d" }, "downloads": -1, "filename": "aiopipe-0.2.2.tar.gz", "has_sig": true, "md5_digest": "306c9de1db9ecea53298e354e4a7f890", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.7", "size": 4422, "upload_time": "2019-10-17T00:02:34", "url": "https://files.pythonhosted.org/packages/ac/c5/ede3669a577fc26add076767f3c99b6736b58984e6b3af06a39e1d7ba41b/aiopipe-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6bec50677c380b7da3e23e1065e2efd3", "sha256": "4796341a4352167452e436f77696e5596ebf9728eb4e4adbc02c8bb66d3349ed" }, "downloads": -1, "filename": "aiopipe-0.2.2-py3-none-any.whl", "has_sig": true, "md5_digest": "6bec50677c380b7da3e23e1065e2efd3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.7", "size": 5129, "upload_time": "2019-10-17T00:02:32", "url": "https://files.pythonhosted.org/packages/7e/0d/aaf3fd512ca381c418ce776ea087c1ce4bf37eaf9711a83f336c2e695d97/aiopipe-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "306c9de1db9ecea53298e354e4a7f890", "sha256": "666282e6e94b8bbd3a49330cd5d4ac95dc217a0d7c2597fb3f43753893a3154d" }, "downloads": -1, "filename": "aiopipe-0.2.2.tar.gz", "has_sig": true, "md5_digest": "306c9de1db9ecea53298e354e4a7f890", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.7", "size": 4422, "upload_time": "2019-10-17T00:02:34", "url": "https://files.pythonhosted.org/packages/ac/c5/ede3669a577fc26add076767f3c99b6736b58984e6b3af06a39e1d7ba41b/aiopipe-0.2.2.tar.gz" } ] }