hug_sentry is a Sentry exception handler for the Python framework hug.
Install via pip:
pip install hug_sentry
This is how you create a Redis store:
from raven import Client
from hug_sentry import SentryExceptionHandler
# Create Raven client
client = Client('https://<key>:<secret>@app.getsentry.com/<project>')
# Create exception handler
handler = SentryExceptionHandler(client)
# Add to hug
__hug__.http.add_exception_handler(Exception, handler)
The arguments are as follows:
- client: A Raven client object.
Remember that the __hug__
object is only available after the first time a hug
decorator has been executed.
hug_sentry is written and maintained by Fabian Kochem for CaT Concepts and Training GmbH.