mangointgit / mangorepo

0 stars 0 forks source link

Setup Airbrake for your Python application #1

Open mangointgit opened 5 months ago

mangointgit commented 5 months ago

Installation

pybrake requires Python 3.6+.

pip install -U pybrake

Configuration

(You can find your project ID and API key in your project's settings)

import pybrake

notifier = pybrake.Notifier(project_id=<Your project ID>,
                            project_key='<Your project API KEY>',
                            environment='production')

Send a test error

To test that you've installed Airbrake correctly, try triggering a test error.

try:
    raise ValueError('hello')
except Exception as err:
    notifier.notify(err)

Full documentation

For more information please visit our official GitHub repo.