airbrake-flask-1.0.7
توضیحات
airbrake-flask - Airbrake client for Python Flask
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | airbrake-flask-1.0.7 |
| نام | airbrake-flask |
| نسخه کتابخانه | 1.0.7 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Kien Pham, Kane Kim |
| ایمیل نویسنده | kien@calolo.com |
| آدرس صفحه اصلی | https://github.com/kienpham2000/airbrake-flask |
| آدرس اینترنتی | https://pypi.org/project/airbrake-flask/ |
| مجوز | MIT |
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
نحوه نصب
نصب پکیج whl airbrake-flask-1.0.7:
pip install airbrake-flask-1.0.7.whl
نصب پکیج tar.gz airbrake-flask-1.0.7:
pip install airbrake-flask-1.0.7.tar.gz