{ "info": { "author": "Tiong Tay", "author_email": "tgtay@outlook.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "\n# py-multistream-select\n\n[![Travis CI](https://api.travis-ci.org/dheatovwil/py-multistream-select.svg?branch=master)](https://travis-ci.org/dheatovwil/py-multistream-select) \n[![codecov.io](https://codecov.io/gh/dheatovwil/py-multistream-select/branch/master/graph/badge.svg)](https://codecov.io/gh/dheatovwil/py-multistream-select)\n\n> an implementation of the multistream protocol in python\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n\n`py-multistream-select` is a standard PyPI module which can be installed with:\n\n```sh\npip install multistream-select\n```\n\n## Usage\n\n### Example\n```python\nfrom multistream_select.multiselect import Multiselect\nfrom multistream_select.multiselect_client import MultiselectClient\n\nasync def client_get_protocol(host_info):\n protocols = [ '/cats', '/dogs' ]\n stream = func_to_create_stream(host_info)\n client = MultiselectClient()\n return await client.select_one_of(protocols, stream)\n\nasync def host_get_protocol(handlers):\n stream = func_to_create_stream()\n host = Multiselect()\n for protocol in handlers:\n host.add_handler(protocol, handlers[protocol])\n return host.negotiate(stream)\n```\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/dheatovwil/py-multistream-select/issues).\n\nCheck out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).\n\nSmall note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\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/dheatovwil/py-multistream-select", "keywords": "ipfs multistream-select", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "multistream-select", "package_url": "https://pypi.org/project/multistream-select/", "platform": "", "project_url": "https://pypi.org/project/multistream-select/", "project_urls": { "Homepage": "https://github.com/dheatovwil/py-multistream-select" }, "release_url": "https://pypi.org/project/multistream-select/0.1.3/", "requires_dist": [ "check-manifest ; extra == 'dev'", "coverage ; extra == 'test'" ], "requires_python": "", "summary": "an implementation of the multistream protocol in python", "version": "0.1.3" }, "last_serial": 4931040, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "e7cced21086fe9df3bcc60d4925b3192", "sha256": "a131e8babefdd5fbae6988761e9d7bc365ad218286989a7f486e55f42b72da21" }, "downloads": -1, "filename": "multistream_select-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "e7cced21086fe9df3bcc60d4925b3192", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11298, "upload_time": "2019-01-08T07:03:56", "url": "https://files.pythonhosted.org/packages/0e/1b/682680217de3350924a11b2d647813636de69790440461aae9078e0f32eb/multistream_select-0.1.2-py3-none-any.whl" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "f51488b1dba1a3dc5140a633d342d1f9", "sha256": "c306e5d9c975000d699f44102429b99fe990423628e410a78d87d2c57fd5ac18" }, "downloads": -1, "filename": "multistream_select-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "f51488b1dba1a3dc5140a633d342d1f9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11303, "upload_time": "2019-03-12T16:52:14", "url": "https://files.pythonhosted.org/packages/56/95/d64936cb6470c90b74dfad6995d96e0725eae2c1cafe57532d5f0f547a0a/multistream_select-0.1.3-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f51488b1dba1a3dc5140a633d342d1f9", "sha256": "c306e5d9c975000d699f44102429b99fe990423628e410a78d87d2c57fd5ac18" }, "downloads": -1, "filename": "multistream_select-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "f51488b1dba1a3dc5140a633d342d1f9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11303, "upload_time": "2019-03-12T16:52:14", "url": "https://files.pythonhosted.org/packages/56/95/d64936cb6470c90b74dfad6995d96e0725eae2c1cafe57532d5f0f547a0a/multistream_select-0.1.3-py3-none-any.whl" } ] }