{ "info": { "author": "Sriram Madapusi Vasudevan", "author_email": "sriram1991mv@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "smoothie\r\n=======================\r\n\r\nPython Exception Based Callbacks\r\n\r\n.. image:: https://travis-ci.org/TheSriram/smoothie.svg?branch=master\r\n :target: https://travis-ci.org/TheSriram/smoothie\r\n\r\nAdd your callbacks to functions as decorators, that are slated to be\r\ncalled as per the Exception raised.\r\n\r\n.. code:: python\r\n\r\n from smoothie.king import Dispenser\r\n\r\n def err_callback(*args, **kwargs):\r\n print(\"Error handled\")\r\n\r\n juice = Dispenser()\r\n\r\n @juice.attach(exception=IndexError,\r\n callback=err_callback)\r\n def vending_machine():\r\n drinks = ['Tea','Coffee', 'Water']\r\n return drinks[4]\r\n\r\n vending_machine()\r\n\r\nTo run the unit tests,\r\n\r\n.. code:: bash\r\n\r\n pip install -r test-requirements.txt\r\n cd smoothie/tests nosetests -vs``\r\n\r\n.. |Build Status| image:: https://api.travis-ci.org/TheSriram/smoothie.png\r\n :target: https://travis-ci.org/TheSriram/smoothie", "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/TheSriram/smoothie", "keywords": "", "license": "Apache", "maintainer": "", "maintainer_email": "", "name": "smoothie", "package_url": "https://pypi.org/project/smoothie/", "platform": "Python", "project_url": "https://pypi.org/project/smoothie/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/TheSriram/smoothie" }, "release_url": "https://pypi.org/project/smoothie/0.1/", "requires_dist": null, "requires_python": null, "summary": "Python Exception Based Callbacks", "version": "0.1" }, "last_serial": 1501027, "releases": { "0.1": [], "0.1.dev14": [ { "comment_text": "", "digests": { "md5": "25631d145d23250f81751657c1c0932c", "sha256": "12b3990b4eea65a709b4cd96b20d5fa440eb98edb33c9dd96708ad34937fe049" }, "downloads": -1, "filename": "smoothie-0.1.dev14.tar.gz", "has_sig": false, "md5_digest": "25631d145d23250f81751657c1c0932c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7262, "upload_time": "2015-04-11T05:21:51", "url": "https://files.pythonhosted.org/packages/de/b8/4ea509b935caefc6e201b565a0c72b6d5856d619436bb5541e42c21c9ab4/smoothie-0.1.dev14.tar.gz" } ] }, "urls": [] }