{ "info": { "author": "Resilient Vitality", "author_email": "zprobst@resilientvitality.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Simple Dispatch\n[![Build Status](https://travis-ci.org/resilient-vitality/SimpleDispatch.svg?branch=master)](https://travis-ci.org/resilient-vitality/SimpleDispatch)\n[![codecov](https://codecov.io/gh/resilient-vitality/SimpleDispatch/branch/master/graph/badge.svg)](https://codecov.io/gh/resilient-vitality/SimpleDispatch)\n\nA library inspired by the Django Dispatch System for simple pub-sub interactions. it is a low footprint \nand small library designed for resource constrained or high-efficiency systems with no dependencies.\n\n## Getting Starting \n\nTo install, `pip install simple-dispatch` or `pipenv install simple-dispatch`\n\n## Usage\n\n### Simple Example\n```python\nfrom simple_dispatch import subscriber, dispatch\n\nMY_EVENT = 'abc'\n\n@subscriber(MY_EVENT)\ndef handle(**kwargs):\n print(kwargs)\n\ndef main():\n dispatch(MY_EVENT, a=1, b=2, c=3)\n\nmain()\n\n# OUTPUT: {'a': 1, 'b': 2, 'c': 3}\n```\n\n### Subscriber Listens to Multiple Events\n\n```python\nfrom simple_dispatch import subscriber, dispatch\n\nMY_EVENT = 'abc'\nMY_SECOND_EVENT = 'xyz'\n\n@subscriber(MY_EVENT, MY_SECOND_EVENT)\ndef handle(**kwargs):\n print(kwargs)\n\ndef main():\n dispatch(MY_EVENT, a=1, b=2, c=3)\n dispatch(MY_SECOND_EVENT, a=4, b=5, c=6)\n\nmain()\n\n# OUTPUT: \n# {'a': 1, 'b': 2, 'c': 3}\n# {'a': 4, 'b': 5, 'c': 6}\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/resilient-vitality/SimpleDispatch", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "simple-dispatch", "package_url": "https://pypi.org/project/simple-dispatch/", "platform": "", "project_url": "https://pypi.org/project/simple-dispatch/", "project_urls": { "Homepage": "https://github.com/resilient-vitality/SimpleDispatch" }, "release_url": "https://pypi.org/project/simple-dispatch/1.1.0/", "requires_dist": null, "requires_python": "", "summary": "A library inspired by the Django Dispatch System for simple pub-sub interactions.", "version": "1.1.0" }, "last_serial": 5900134, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "5285dd67a7eb2073d32814de94a917ff", "sha256": "1e463a06d7db046c3c7a2ad032a035f72a316abff1f568e3e4dd4181c69f48a3" }, "downloads": -1, "filename": "simple_dispatch-1.0.0.tar.gz", "has_sig": false, "md5_digest": "5285dd67a7eb2073d32814de94a917ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2332, "upload_time": "2019-09-28T06:10:46", "url": "https://files.pythonhosted.org/packages/cb/e4/493a7172a2712a845714aad41bdf3a053841999e9fb1e2e3bd5b30cdb297/simple_dispatch-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "2a3449822a555bb35cb7b77a6bf66b53", "sha256": "c325387b69223aaf9abf260d0cc74fce3d213f529c2a9272d301193a422f6b28" }, "downloads": -1, "filename": "simple_dispatch-1.1.0.tar.gz", "has_sig": false, "md5_digest": "2a3449822a555bb35cb7b77a6bf66b53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2660, "upload_time": "2019-09-28T17:27:49", "url": "https://files.pythonhosted.org/packages/36/d9/fdb691f8d6d7022966990e4e7eb6215dcfb6655e6f6e813f2da34639ea49/simple_dispatch-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2a3449822a555bb35cb7b77a6bf66b53", "sha256": "c325387b69223aaf9abf260d0cc74fce3d213f529c2a9272d301193a422f6b28" }, "downloads": -1, "filename": "simple_dispatch-1.1.0.tar.gz", "has_sig": false, "md5_digest": "2a3449822a555bb35cb7b77a6bf66b53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2660, "upload_time": "2019-09-28T17:27:49", "url": "https://files.pythonhosted.org/packages/36/d9/fdb691f8d6d7022966990e4e7eb6215dcfb6655e6f6e813f2da34639ea49/simple_dispatch-1.1.0.tar.gz" } ] }