{ "info": { "author": "Chris Beaumont", "author_email": "cbeaumont@cfa.harvard.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Topic :: Utilities" ], "description": "echo: Callback Properties in Python\r\n===================================\r\n\r\nEcho is a small library for attaching callback functions to property\r\nstate changes. For example:\r\n\r\n::\r\n\r\n class Switch(object):\r\n state = CallbackProperty('off')\r\n\r\n def report_change(state):\r\n print 'the switch is %s' % state\r\n\r\n s = Switch()\r\n add_callback(s, 'state', report_change)\r\n\r\n s.state = 'on' # prints 'the switch is on'\r\n\r\nCalllbackProperties can also be built using decorators\r\n\r\n::\r\n\r\n class Switch(object):\r\n\r\n @callback_property\r\n def state(self):\r\n return self._state\r\n\r\n @state.setter\r\n def state(self, value):\r\n if value not in ['on', 'off']:\r\n raise ValueError(\"invalid setting\")\r\n self._state = value\r\n\r\nFull documentation is avilable `here `__\r\n\r\n|Build Status| |Coverage Status|\r\n\r\n.. |Build Status| image:: https://travis-ci.org/glue-viz/echo.png\r\n :target: https://travis-ci.org/glue-viz/echo?branch=master\r\n.. |Coverage Status| image:: https://coveralls.io/repos/glue-viz/echo/badge.png\r\n :target: https://coveralls.io/r/glue-viz/echo", "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/glue-viz/echo", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "echo", "package_url": "https://pypi.org/project/echo/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/echo/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/glue-viz/echo" }, "release_url": "https://pypi.org/project/echo/0.1/", "requires_dist": null, "requires_python": null, "summary": "Callback Properties in Python", "version": "0.1" }, "last_serial": 1028970, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "418436f523957107f484969c025aaa51", "sha256": "714965b7a839d793bff17b4c4e1bc51eaeafad337e2ea2343b85d910c44303c3" }, "downloads": -1, "filename": "echo-0.1.tar.gz", "has_sig": false, "md5_digest": "418436f523957107f484969c025aaa51", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5452, "upload_time": "2014-03-13T18:51:29", "url": "https://files.pythonhosted.org/packages/e6/f0/d31d5cd5dd7e3ed636192317db3a4e50e05f08d4f7a30fa7a6ea6e801920/echo-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "418436f523957107f484969c025aaa51", "sha256": "714965b7a839d793bff17b4c4e1bc51eaeafad337e2ea2343b85d910c44303c3" }, "downloads": -1, "filename": "echo-0.1.tar.gz", "has_sig": false, "md5_digest": "418436f523957107f484969c025aaa51", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5452, "upload_time": "2014-03-13T18:51:29", "url": "https://files.pythonhosted.org/packages/e6/f0/d31d5cd5dd7e3ed636192317db3a4e50e05f08d4f7a30fa7a6ea6e801920/echo-0.1.tar.gz" } ] }