{ "info": { "author": "Giorgio Salluzzo", "author_email": "giorgio.salluzzo@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Flask", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "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": "==================\nFlask-Breathalyzer\n==================\n\n.. image:: https://api.travis-ci.org/mindflayer/flask-breathalyzer.png?branch=master\n :target: http://travis-ci.org/mindflayer/flask-breathalyzer\n\n.. image:: https://coveralls.io/repos/mindflayer/flask-breathalyzer/badge.png?branch=master\n :target: https://coveralls.io/r/mindflayer/flask-breathalyzer\n\nA Flask module pushing exceptions to Datadog\n--------------------------------------------\n\n.. image:: https://raw.githubusercontent.com/mindflayer/flask-breathalyzer/master/Flask-Breathalyzer.png\n\nFeatures\n========\n- Pushing exceptions to Datadog;\n- Blacklist for `headers` or `data` as list of *XPATH style* strings (you may have some headers you do not want to publish for privacy, or maybe some body fields you do not need to display - e.g.: a base64 blob).\n\nInstallation\n============\nUsing pip::\n\n $ pip install flask_breathalyzer[datadog]\n\nIssues\n============\nWhen opening an **Issue**, please add few lines of code as failing test, or -better- open its relative **Pull request** adding this test to our test suite.\n\nQuick example\n=============\nLet's create a new virtualenv with all we need::\n\n $ virtualenv example\n $ source example/bin/activate\n $ pip install pytest flask_breathalyzer[datadog]\n\nAs second step, we create a test `example.py` file as the following one:\n\n.. code-block:: python\n\n from flask import Flask\n import datadog\n\n from flask_breathalyzer import Breathalyzer\n\n\n def test_example():\n\n app = Flask(__name__)\n\n @app.route(\"/\")\n def boom():\n 1/0\n\n # from http://docs.datadoghq.com/api/\n options = {\n 'api_key': 'your-datadog-api-key',\n 'app_key': 'your-datadog-app-key'\n }\n\n ba = Breathalyzer(app, **options)\n response = test_client.get('/')\n assert response.status == '500 INTERNAL SERVER ERROR'\n assert b'