Honeybadger-Extensions
Honeybadger-Extensions extend current Honeybadger Python library to better support Celery & Flask.
It offers:
Improved reporting, including details for component, action etc.
Easier Honeybadger via Flask’s or Celery’s configuration object.
(Optional) Automatic reporting of errors detected by Celery or Flask.
Features
Honeybadger-Extensions provides the install_celery_handler() function which can be used at any time which can be used to initialize both Honeybadger & allow improved Honeybadger reporting. It also offers the HoneybadgerFlask Flask extension that adds more information to Honeybadger logging, as well as automatic logging of errors raised in the view functions.
Example 1: Initialize Celery
In the following example, we will use the install_celery_handler to setup Honeybadger reporting.
from celery import Celery
from honeybadger_extensions import install_celery_handler
celery = Celery(__name__)
celery.config_from_object({
'HONEYBADGER_API_KEY': '<your key>',
'HONEYBADGER_ENVIRONMENT': 'development'
})
install_celery_handler(config=celery.conf, report_exceptions=True)
Example 2: Initialize Flask
You can use HoneybadgerFlask extension to load Honeybadger configuration from Flask configuration object.
from flask import Flask, jsonify
from honeybadger_extensions import HoneybadgerFlask
app = Flask(__name__)
app.config['HONEYBADGER_ENVIRONMENT'] = 'development'
app.config['HONEYBADGER_API_KEY'] = '<your key>'
app.config['HONEYBADGER_EXCLUDE_HEADERS'] = 'Authorization, Proxy-Authorization, X-Custom-Key'
app.config['HONEYBADGER_PARAMS_FILTERS'] = 'password, secret, credit-card'
# Setup Honeybadger and listen for exceptions
HoneybadgerFlask(app, report_exceptions=True)
@app.route('/')
def index():
a = int(request.args.get('a'))
b = int(request.args.get('b'))
logger.info('Dividing two numbers {} {}'.format(a, b))
return jsonify({'result': a / b})
Installation
The easiest way to install it is using pip from PyPI
pip install Honeybadger-Extensions
License
See the LICENSE file for license rights and limitations (MIT).
Metadata
Release files for Honeybadger-Extensions 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Honeybadger-Extensions-0.1.2.tar.gz | 7.6 kB | Without provenance | Details for Honeybadger-Extensions-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Honeybadger_Extensions-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for Honeybadger_Extensions-0.1.2-py3-none-any.whl |
Total release size: 17.3 kB
Release files / Honeybadger-Extensions-0.1.2.tar.gz
| Download URL | Honeybadger-Extensions-0.1.2.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6301bf12fc6ead228314f03c73e3093786a12e89e6c212f01ff34ffafeec0fd6
|
|
BLAKE2b-256 checksum How to use checksums |
dad439ced0da5ebdc28f941f7fd0a8898debea2d2c8db48d50f105c487ddeb56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / Honeybadger_Extensions-0.1.2-py3-none-any.whl
| Download URL | Honeybadger_Extensions-0.1.2-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5388b3acb7ff6cc78d0c405184d0a05686514c5d132cfa4ef2c6de85c494a615
|
|
BLAKE2b-256 checksum How to use checksums |
bc15e3b9d38e6979b38f87f7707cff37d1832d844d8586e6f7bcbfb61b68b038
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for Honeybadger-Extensions 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.