{ "info": { "author": "Kevin Conway", "author_email": "kevinjacobconway@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "============\neventemitter\n============\n\n*Tools for publishing and listening for events.*\n\nExample Usage\n=============\n\nEventEmitter\n------------\n\nThe `EventEmitter` class can be used directly or as a mix-in to provide the\nability to publish and subscribe to events.\n\n.. code-block:: python\n\n import logging\n from eventemitter import EventEmitter\n\n log = logging.getLogger(__name__)\n emitter = EventEmitter()\n\n def log_event(event, *args, **kwargs):\n log.debug('%s %s %s', event, args, kwargs)\n\n emitter.on('an-event', log_event)\n emitter.emit('an-event', 1, 2, keyword=3)\n await asyncio.sleep(0) # 'an-even (1, 2), {keyword: 3}' gets logged.\n\nListener functions can be defined using `def` or `async def`. All listeners are\nexecuted in a deferred way. The coro that calls `emit` must yield for the event\nto propagate.\n\nEventIterable\n-------------\n\nIf the callback-style model of listening for events is undesirable, an async\niterable is provided to offer a second model for handling events.\n\n.. code-block:: python\n\n import logging\n from eventemitter import EventEmitter\n from eventemitter import EventIterable\n\n log = logging.getLogger(__name__)\n emitter = EventEmitter()\n iterable = EventIterable(emitter, 'an-event')\n\n async for args, kwargs in iterable:\n\n log.debug('%s %s %s', event, args, kwargs)\n\nThe `EventIterable` implements the async iterable interface and can be used in\nconjunction with any of the tools in\n`aitertools `_.\n\nTesting\n=======\n\nAll tests suites are paired one-to-one with the module they test and live\ndirectly adjacent to that same module. All tests are expected to pass for\nPython 3.5 and above. To run tests use tox with the included tox.ini file or\ncreate a virtualenv and install the '[testing]' extras.\n\nLicense\n=======\n\n Copyright 2015 Kevin Conway\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\nContributing\n============\n\nFirstly, if you're putting in a patch then thank you! Here are some tips for\ngetting your patch merged:\n\nStyle\n-----\n\nAs long as the code passes the PEP8 and PyFlakes gates then the style is\nacceptable.\n\nDocs\n----\n\nThe PEP257 gate will check that all public methods have docstrings. If you're\nadding something new, like a helper function, try out the\n`napoleon style of docstrings `_.\n\nTests\n-----\n\nMake sure the patch passes all the tests. If you're adding a new feature don't\nforget to throw in a test or two. If you're fixing a bug then definitely add\nat least one test to prevent regressions.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/asyncdef/eventemitter", "keywords": null, "license": "Apache 2.0", "maintainer": null, "maintainer_email": null, "name": "eventemitter", "package_url": "https://pypi.org/project/eventemitter/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/eventemitter/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/asyncdef/eventemitter" }, "release_url": "https://pypi.org/project/eventemitter/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Tools for working with async events.", "version": "0.2.0" }, "last_serial": 1860164, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "08a5876864c73a75c942444cea4e7341", "sha256": "87a3b93f7ce14c3476d7f9f54150c0498e129a3f2c175d5875083104a9a43000" }, "downloads": -1, "filename": "eventemitter-0.1.0.tar.gz", "has_sig": false, "md5_digest": "08a5876864c73a75c942444cea4e7341", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11797, "upload_time": "2015-10-24T02:05:44", "url": "https://files.pythonhosted.org/packages/cb/e0/757f0e85d6f626087e72bf78b28a852ff9a63eae9625dadc423eaa80c842/eventemitter-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "5bcb23cee48d16bb5520b0959273bf9e", "sha256": "031c92176c186b6600805d9ac0b716dc6f78a83c316ca7eceeb0cde37831c383" }, "downloads": -1, "filename": "eventemitter-0.1.1.tar.gz", "has_sig": false, "md5_digest": "5bcb23cee48d16bb5520b0959273bf9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11783, "upload_time": "2015-10-24T02:11:51", "url": "https://files.pythonhosted.org/packages/3e/6b/3cecfb1c6782593ca3ee40e81ca074647f9963c90ad69715f5395859cf60/eventemitter-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "094709eca24ffc793a53f4f5003f297f", "sha256": "0147a0d6fc8b03641997b337b8c755e89608bd0784335a4fec50bde1e31f8d6f" }, "downloads": -1, "filename": "eventemitter-0.2.0.tar.gz", "has_sig": false, "md5_digest": "094709eca24ffc793a53f4f5003f297f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12171, "upload_time": "2015-12-13T16:33:33", "url": "https://files.pythonhosted.org/packages/3b/a0/db97dda7c660e4263103c697e080b517b06254661e6033e4a81c0848e808/eventemitter-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "094709eca24ffc793a53f4f5003f297f", "sha256": "0147a0d6fc8b03641997b337b8c755e89608bd0784335a4fec50bde1e31f8d6f" }, "downloads": -1, "filename": "eventemitter-0.2.0.tar.gz", "has_sig": false, "md5_digest": "094709eca24ffc793a53f4f5003f297f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12171, "upload_time": "2015-12-13T16:33:33", "url": "https://files.pythonhosted.org/packages/3b/a0/db97dda7c660e4263103c697e080b517b06254661e6033e4a81c0848e808/eventemitter-0.2.0.tar.gz" } ] }