Skip to main content

airbrake-flask - Airbrake client for Python Flask

Project description

airbrake-flask is a fast library that use the amazing requests library to send
error, exception messages to airbrake.io. You can use this library with the
amazing gevent library to send your request asynchronously.

Example Usage with gevent
-------------------------
from flask import Flask, request, got_request_exception
from airbrake.airbrake import AirbrakeErrorHandler
import gevent
import sys

app = Flask(__name__)
ENV = ('ENV' in os.environ and os.environ['ENV']) or 'prod'

def log_exception(error):
handler = AirbrakeErrorHandler(api_key="PUT_YOUR_AIRBRAKE_KEY_HERE",
env_name=ENV, request=request)
gevent.spawn(handler.emit, error, sys.exc_info())

got_request_exception.connect(log_exception, app)

Contribute
----------
This library is hosted on Github and you can contribute there:
http://github.com/kienpham2000/airbrake-flask

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

airbrake-flask-1.0.7.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file airbrake-flask-1.0.7.tar.gz.

File metadata

File hashes

Hashes for airbrake-flask-1.0.7.tar.gz
Algorithm Hash digest
SHA256 e2fff64221bbbcb51c5951861f1554d9f1adf311e818389164a69205eb7396e3
MD5 13609f4ac7e97966228bae5697a8eb7e
BLAKE2b-256 e513d50eff0b9c401696781b29709ffd5b81408250a96cd6b79624be94973fa5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page