{"id":16320648,"url":"https://github.com/mindflayer/flask-breathalyzer","last_synced_at":"2025-10-25T19:31:14.370Z","repository":{"id":57430159,"uuid":"56860400","full_name":"mindflayer/flask-breathalyzer","owner":"mindflayer","description":"A Flask module pushing exceptions to Datadog","archived":false,"fork":false,"pushed_at":"2017-08-29T20:32:00.000Z","size":176,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-13T23:58:21.314Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mindflayer.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-22T14:15:28.000Z","updated_at":"2017-08-29T20:28:06.000Z","dependencies_parsed_at":"2022-08-26T03:25:27.754Z","dependency_job_id":null,"html_url":"https://github.com/mindflayer/flask-breathalyzer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindflayer%2Fflask-breathalyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindflayer%2Fflask-breathalyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindflayer%2Fflask-breathalyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindflayer%2Fflask-breathalyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mindflayer","download_url":"https://codeload.github.com/mindflayer/flask-breathalyzer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219865156,"owners_count":16555931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T22:45:00.548Z","updated_at":"2025-10-25T19:31:08.886Z","avatar_url":"https://github.com/mindflayer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"==================\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'\u003ctitle\u003e500 Internal Server Error\u003c/title\u003e' in response.data\n        assert response.mimetype == 'text/html'\n        assert isinstance(ba.last_event_id, int)  # your exception is now on Datadog with this ID\n\n\nLet's fire our example test::\n\n    $ py.test example.py\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindflayer%2Fflask-breathalyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmindflayer%2Fflask-breathalyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindflayer%2Fflask-breathalyzer/lists"}