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
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
Release history Release notifications | RSS feed
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.5.tar.gz
(3.3 kB
view details)
File details
Details for the file airbrake-flask-1.0.5.tar.gz
.
File metadata
- Download URL: airbrake-flask-1.0.5.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49fe3cdb645f866bc863e8d14c2c3784a5147d40e151e4bd0a5a0fb820b93666 |
|
MD5 | c1d10c4ef059b75a881e183d198019ae |
|
BLAKE2b-256 | 0b9b2a92e3483c5e2189b45a28deab1128874c6f1f7cf83bff443c59fcd3bdd3 |