{ "info": { "author": "Nicola Iarocci", "author_email": "nicola@nicolaiarocci.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development" ], "description": "Events\n~~~~~~\n.. image:: https://secure.travis-ci.org/pyeve/events.png?branch=master \n :target: https://secure.travis-ci.org/pyeve/events\n\nThe C# language provides a handy way to declare, subscribe to and fire events.\nTechnically, an event is a \"slot\" where callback functions (event handlers) can\nbe attached to - a process referred to as subscribing to an event. Here is\na handy package that encapsulates the core to event subscription and event\nfiring and feels like a \"natural\" part of the language.\n\n.. code-block:: pycon\n \n >>> def something_changed(reason): \n ... print \"something changed because %s\" % reason \n ...\n\n >>> from events import Events\n >>> events = Events()\n >>> events.on_change += something_changed\n\nMultiple callback functions can subscribe to the same event. When the event is\nfired, all attached event handlers are invoked in sequence. To fire the event,\nperform a call on the slot: \n\n.. code-block:: pycon\n\n >>> events.on_change('it had to happen')\n 'something changed because it had to happen'\n\nBy default, Events does not check if an event can be subscribed to and fired. \nYou can predefine events by subclassing Events and listing them. Attempts to\nsubscribe to or fire an undefined event will raise an EventsException.\n\n.. code-block:: pycon\n \n >>> class MyEvents(Events):\n ... __events__ = ('on_this', 'on_that', )\n\n >>> events = MyEvents()\n\n # this will raise an EventsException as `on_change` is unknown to MyEvents:\n >>> events.on_change += something_changed\n\nYou can also predefine events for a single Events instance by passing an iterator to the constructor.\n\n.. code-block:: pycon\n\n >>> events = Events(('on_this', 'on_that'))\n\n # this will raise an EventsException as `on_change` is unknown to events:\n >>> events.on_change += something_changed\n\n\nDocumentation\n-------------\nComplete documentation is available at http://events.readthedocs.org\n\nInstalling\n----------\nEvents is on PyPI so all you need to do is: ::\n\n pip install events\n\nTesting\n-------\nJust run: ::\n\n python setup.py test\n\nOr use tox to test the package under all supported Pythons: 2.6, 2.7, 3.3, 3.4, 3.5 and 3.6. \n\nLicense\n-------\nEvents is BSD licensed. See the LICENSE_ for details.\n\nContributing\n------------\nPlease see the `Contribution Guidelines`_.\n\nAttribution\n-----------\nBased on the excellent recipe by `Zoran Isailovski`_, Copyright (c) 2005.\n\n.. _LICENSE: https://github.com/pyeve/events/blob/master/LICENSE \n.. _`Zoran Isailovski`: http://code.activestate.com/recipes/410686/\n.. _`Contribution Guidelines`: https://github.com/pyeve/events/blob/master/CONTRIBUTING.rst", "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/pyeve/events", "keywords": null, "license": "Copyright (c) 2017 by Nicola Iarocci and contributors. See AUTHORS\nfor more details.\n\nSome rights reserved.\n\nRedistribution and use in source and binary forms of the software as well\nas documentation, with or without modification, are permitted provided\nthat the following conditions are met:\n\n* Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n* The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\nTHIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND\nCONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT\nNOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER\nOR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\nEXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\nPROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\nLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGE.", "maintainer": null, "maintainer_email": null, "name": "Events", "package_url": "https://pypi.org/project/Events/", "platform": "any", "project_url": "https://pypi.org/project/Events/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/pyeve/events" }, "release_url": "https://pypi.org/project/Events/0.3/", "requires_dist": null, "requires_python": null, "summary": "Bringing the elegance of C# EventHandler to Python", "version": "0.3" }, "last_serial": 2916722, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "86957aac3dbf4b1de1cff139825e9261", "sha256": "e79f6a4580ac68bb8ad48865b995bfabd1b8b75aa491a31f9c15880b58cd6208" }, "downloads": -1, "filename": "Events-0.1.0.tar.gz", "has_sig": false, "md5_digest": "86957aac3dbf4b1de1cff139825e9261", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4632, "upload_time": "2013-03-13T16:15:30", "url": "https://files.pythonhosted.org/packages/57/37/83fec80f3115a44b5c52ca292efbce58c844a35b6079913ac9a0fb2b915a/Events-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "4a7f01e8d1ad568f52e10f2a5f783e98", "sha256": "174ada2577db1b66629ef36cf687b1ec17311790044f4e875cd01df02da1e481" }, "downloads": -1, "filename": "Events-0.2.0.tar.gz", "has_sig": false, "md5_digest": "4a7f01e8d1ad568f52e10f2a5f783e98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4666, "upload_time": "2013-09-23T07:12:41", "url": "https://files.pythonhosted.org/packages/12/df/77d5a99e05375c6cc100990240704dbfc56aff1ce42523d586d05bcb7071/Events-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "01fb6bffd04b4f323e539c8cf592b423", "sha256": "0a7f6ca93ff5eac108e9555c50b5b0a23d4e6ec5517c079b13b1c9acb6f3d567" }, "downloads": -1, "filename": "Events-0.2.1.tar.gz", "has_sig": false, "md5_digest": "01fb6bffd04b4f323e539c8cf592b423", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4745, "upload_time": "2014-05-15T08:45:13", "url": "https://files.pythonhosted.org/packages/8d/e3/55b90312c2640722ed2b4ef378a0782109f71b1801072466d6a7e9dba584/Events-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "e18b58fdb836df4b4939c96a97365afa", "sha256": "1d09f09d5ab496815e9bfd2194546d75fd54b8e76703f4fd83314080de94b86d" }, "downloads": -1, "filename": "Events-0.2.2.tar.gz", "has_sig": false, "md5_digest": "e18b58fdb836df4b4939c96a97365afa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4849, "upload_time": "2017-01-02T08:57:18", "url": "https://files.pythonhosted.org/packages/56/81/4d1d71a8553d8f294560b9a6f9fe584e65289c9f6b8753b5d352511c2d58/Events-0.2.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "59437d815bd15ba9e48925fd70e65014", "sha256": "f4d9c41a5c160ce504278f219fe56f44242ca63794a0ad638b52d1e087ac2a41" }, "downloads": -1, "filename": "Events-0.3.tar.gz", "has_sig": false, "md5_digest": "59437d815bd15ba9e48925fd70e65014", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5308, "upload_time": "2017-06-01T12:47:59", "url": "https://files.pythonhosted.org/packages/29/6e/c146def4c521654330294f24f349ec6b1bbc1b4079c12397d5d670bb695e/Events-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "59437d815bd15ba9e48925fd70e65014", "sha256": "f4d9c41a5c160ce504278f219fe56f44242ca63794a0ad638b52d1e087ac2a41" }, "downloads": -1, "filename": "Events-0.3.tar.gz", "has_sig": false, "md5_digest": "59437d815bd15ba9e48925fd70e65014", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5308, "upload_time": "2017-06-01T12:47:59", "url": "https://files.pythonhosted.org/packages/29/6e/c146def4c521654330294f24f349ec6b1bbc1b4079c12397d5d670bb695e/Events-0.3.tar.gz" } ] }