{ "info": { "author": "Ivan Cai, lwher", "author_email": "caizixian@users.noreply.github.com, 751276936@qq.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Affero General Public License v3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only" ], "description": "# pshub\n`pshub` is a lightweight Python framework that partially implements Publish/Subscribe messaging paradigm. \n\nIt utilizes `asyncio` library to support concurrent requests handling. The Python version that we recommend is 3.5+ .\n\n## Name\n\nThe name `pshub` indicates the three main components of this library \u2014 Pub, Sub and Hub.\n\n## Usage\n\nYou can refer to the three example files under directory `examples/`.\n\n## Cheatsheet\n\n### Rule\n\n#### Example\n\n`{\"level\": {\">=\": 1, \"<\": 10}, \"message_body\": {\"contains\": \"ERROR\"}}`\n\n#### Valid Operators\n\n- `contains`\n- `<`\n- `<=`\n- `>`\n- `>=`\n- `=`\n- `!=`\n- `excludes`\n\n### Message\n\n#### Example\n\n`{\"level\": 2, \"message_body\": \"ERROR occurs\"}`\n\n## Caveats\n\n- All messages/rules should be Python `dict` whose keys and values are primitive Python type (int, string, etc.)\n\n- The second parameter of the constructor of `PubProtocol`, `msg_gen`, should has following method:\n\n```python\nclass MessageGenerator(object):\n def next(self, loop):\n \"\"\"\n Return next message \n \n Stop the loop if there's no message to publish.\n \"\"\"\n pass\n```\n\n## License\n\nPlumbum - A Pub/Sub framework implemented in Python\nCopyright (C) 2016 caizixian, lwher\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published\nby the Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this program. If not, see .", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/caizixian/pshub", "keywords": "asyncio pub sub", "license": "AGPLv3", "maintainer": "", "maintainer_email": "", "name": "pshub", "package_url": "https://pypi.org/project/pshub/", "platform": "", "project_url": "https://pypi.org/project/pshub/", "project_urls": { "Homepage": "https://github.com/caizixian/pshub" }, "release_url": "https://pypi.org/project/pshub/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "A Pub/Sub framework implemented in Python", "version": "0.0.2" }, "last_serial": 2551240, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "1cd07d51304dc982bdf26e07c7c0c2a7", "sha256": "14141c850fa7e60492e1b2d052e80c031b707e760a9a56b24271e7ff97a5f4ca" }, "downloads": -1, "filename": "pshub-0.0.1.tar.gz", "has_sig": false, "md5_digest": "1cd07d51304dc982bdf26e07c7c0c2a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4479, "upload_time": "2016-12-30T06:47:27", "url": "https://files.pythonhosted.org/packages/2f/22/8a5ba31fe30756d6d5dc903c44828c0c497af0eb61369667ef1c7ca4c553/pshub-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "c6620fadc764bd99a709276b59f72016", "sha256": "4bcb51749002ba0b26a497896b066431391e03dd661ea2d5d9312e94b97d0260" }, "downloads": -1, "filename": "pshub-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c6620fadc764bd99a709276b59f72016", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4430, "upload_time": "2017-01-03T09:17:04", "url": "https://files.pythonhosted.org/packages/3d/b2/d37e2a41e06337c8fa6f7e89beac28828a04911ddc54dbbc45087e6f20f0/pshub-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c6620fadc764bd99a709276b59f72016", "sha256": "4bcb51749002ba0b26a497896b066431391e03dd661ea2d5d9312e94b97d0260" }, "downloads": -1, "filename": "pshub-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c6620fadc764bd99a709276b59f72016", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4430, "upload_time": "2017-01-03T09:17:04", "url": "https://files.pythonhosted.org/packages/3d/b2/d37e2a41e06337c8fa6f7e89beac28828a04911ddc54dbbc45087e6f20f0/pshub-0.0.2.tar.gz" } ] }