{ "info": { "author": "Su Yeol Jeon", "author_email": "devxoul@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Flask-ErrorHandler\n==================\n\nFlask-ErrorHandler provides a generic error handler for blueprints.\n\nSample::\n\n from flask import Flask, Blueprint\n from flask.ext.errorhandler import ErrorHandler\n import json\n\n app = Flask(__name__)\n api_blueprint = Blueprint('api', 'api')\n web_blueprint = Blueprint('web', 'web')\n\n errorhandler = ErrorHandler()\n errorhandler.init_app(app)\n\n @errorhandler.errorhandler(api_blueprint)\n def handle_error(e):\n data = {\n 'error': {\n 'code': e.code,\n 'message': e.description\n }\n }\n response = Response(json.dumps(data),\n mimetype='application/json',\n status=e.code)\n return response\n\n @errorhandler.errorhandler(web_blueprint)\n def handle_error(e):\n body = '
%s
' % (e.code, e.description)\n response = Response(body, mimetype='text/html', status=e.code)\n return response", "description_content_type": null, "docs_url": null, "download_url": "https://pypi.python.org/packages/source/F/Flask-ErrorHandler/Flask-ErrorHandler-0.1.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/devxoul/flask-errorhandler", "keywords": "Flask,Blueprint,Error,Handler", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "Flask-ErrorHandler", "package_url": "https://pypi.org/project/Flask-ErrorHandler/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Flask-ErrorHandler/", "project_urls": { "Download": "https://pypi.python.org/packages/source/F/Flask-ErrorHandler/Flask-ErrorHandler-0.1.0.tar.gz", "Homepage": "https://github.com/devxoul/flask-errorhandler" }, "release_url": "https://pypi.org/project/Flask-ErrorHandler/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Generic error handlers for Flask blueprints.", "version": "0.1.0" }, "last_serial": 1084983, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f463b6ed8a7839163dcde2d225c549c3", "sha256": "61b752a4464661c2edb940b42b1355003cdff8c0b2975fe5254c25a8239fd9f6" }, "downloads": -1, "filename": "Flask-ErrorHandler-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f463b6ed8a7839163dcde2d225c549c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3398, "upload_time": "2014-05-08T07:47:56", "url": "https://files.pythonhosted.org/packages/74/b8/f29522645605908c9ef28b8371c2a71a23a573f9b24bcb83ec44f213d71f/Flask-ErrorHandler-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f463b6ed8a7839163dcde2d225c549c3", "sha256": "61b752a4464661c2edb940b42b1355003cdff8c0b2975fe5254c25a8239fd9f6" }, "downloads": -1, "filename": "Flask-ErrorHandler-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f463b6ed8a7839163dcde2d225c549c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3398, "upload_time": "2014-05-08T07:47:56", "url": "https://files.pythonhosted.org/packages/74/b8/f29522645605908c9ef28b8371c2a71a23a573f9b24bcb83ec44f213d71f/Flask-ErrorHandler-0.1.0.tar.gz" } ] }