{ "info": { "author": "Jesse London", "author_email": "jesse@edgeflip.com", "bugtrack_url": null, "classifiers": [], "description": "Paperboy\n========\n\nA simple fork of ``django.dispatch`` for use as a standalone Python\nPubSub library.\n\nUse\n---\n\nPaperboy's ``dispatch`` may be used identically to Django's; they are\nessentially the same.\n\nA \"signal dispatcher\" helps decoupled applications notify each other of\nevents. A library, for instance, may thereby invoke callables of\ndependent applications, without having been programmed for them, and\nwithout needing to extend or patch the library. The *signal* notifies\nregistered *receivers* on behalf of their sender, via the *dispatcher*.\n\nFor example, say we have a pizza delivery library. Its job is only to\ncommunicate with the pizza delivery Internet API; rather than program a\nsingle user notification pipeline, this library's developer wants to\nsend a signal to subscribed receivers that a pizza has been delivered:\n\n::\n\n from dispatch import Signal\n\n delivered = Signal(providing_args=['parlor'])\n\nUpon learning that a pizza has been delivered, the library could then\nsend this signal:\n\n::\n\n class PizzaAPI(object):\n\n def check(self):\n response = self.get_response()\n if response.status == 'delivered':\n delivered.send(sender=self, parlor=response.parlor)\n\nHowever, a signal's not much use if no one's around to receive it.\nApplications making use of the pizza delivery library may register\nreceivers with the dispatcher via the signal they intend to receive:\n\n::\n\n delivered.connect(popup_window)\n\nor using the ``receiver`` decorator:\n\n::\n\n from dispatch import receiver\n\n @receiver(delivered)\n def popup_window(sender, parlor, **kws):\n ...\n\nSee `Django's\ndocumentation `_\nfor more information.\n\nConfiguration\n-------------\n\nPaperboy's ``dispatch`` is ready for use. However, its ``Signal``, as in\nDjango, respects a debugging mode, under which receivers are inspected\nupon connection. Paperboy does not supply a configuration framework of\nits own, but you may trivially configure it, as in the below examples.\n\nGlobally:\n\n::\n\n from dispatch import Signal\n Signal.debug = True\n\nBy application:\n\n::\n\n from dispatch import Signal\n\n class AtariSignal(Signal):\n\n debug = True\n\nAnd with increasing sophistication:\n\n::\n\n from dispatch import Signal\n from atari.conf import settings\n\n class AtariSignal(Signal):\n\n @property\n def debug(self):\n return settings.DEBUG\n\nInstallation\n------------\n\nWith an installation tool such as pip:\n\n::\n\n pip install Paperboy\n\nFrom source:\n\n::\n\n python setup.py install\n\nRunning tests\n-------------\n\nVia the setup.py file:\n\n::\n\n python setup.py test", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/edgeflip/dispatch", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "Paperboy", "package_url": "https://pypi.org/project/Paperboy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Paperboy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/edgeflip/dispatch" }, "release_url": "https://pypi.org/project/Paperboy/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "A simple fork of django.dispatch for use as a standalone PubSub library.", "version": "1.0.1" }, "last_serial": 996556, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "ce34dc240ab8d262cb794d8a9ebae96d", "sha256": "6ede564ede3eae8be4c721e3ce09298f0815e07587c52395f79c473a21477b71" }, "downloads": -1, "filename": "Paperboy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "ce34dc240ab8d262cb794d8a9ebae96d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12994, "upload_time": "2014-02-08T04:59:23", "url": "https://files.pythonhosted.org/packages/a3/6d/0fbbf38634168270fd8109f0bfbdf6f9540b3d32af2297e5046352893451/Paperboy-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "a6e3b50af08414988eb429e1f2a8f870", "sha256": "68c65250c51ac2f659034e8f91cd26afa9242014c3455e577668f60e49cd2d34" }, "downloads": -1, "filename": "Paperboy-1.0.1.tar.gz", "has_sig": false, "md5_digest": "a6e3b50af08414988eb429e1f2a8f870", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15023, "upload_time": "2014-02-10T20:27:21", "url": "https://files.pythonhosted.org/packages/d3/37/14192e859ba8dd79fecd57838c63b7ef18c6de328a1983c4cba8a487049b/Paperboy-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a6e3b50af08414988eb429e1f2a8f870", "sha256": "68c65250c51ac2f659034e8f91cd26afa9242014c3455e577668f60e49cd2d34" }, "downloads": -1, "filename": "Paperboy-1.0.1.tar.gz", "has_sig": false, "md5_digest": "a6e3b50af08414988eb429e1f2a8f870", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15023, "upload_time": "2014-02-10T20:27:21", "url": "https://files.pythonhosted.org/packages/d3/37/14192e859ba8dd79fecd57838c63b7ef18c6de328a1983c4cba8a487049b/Paperboy-1.0.1.tar.gz" } ] }