Skip to main content

Flask extension for Airbrake

Project description

Flask-Airbrake
===============================
[![Build Status](https://travis-ci.org/rstit/flask-airbrake.svg?branch=master)](https://travis-ci.org/rstit/flask-airbrake)

version number: 0.0.3

contributor: Piotr Poteralski

Overview
--------

Flask extension for Airbrake

Installation
--------------------

To install use pip:
```bash
$ pip install Flask-Airbrake
```

Or clone the repo:
```bash
$ git clone https://github.com/rstit/flask-airbrake.git
$ python setup.py install
```
Usage
-----
The first thing you’ll need to do is setup config:
```python
AIRBRAKE_API_KEY = os_env.get('AIRBRAKE_API_KEY')
AIRBRAKE_PROJECT_ID = os_env.get('AIRBRAKE_PROJECT_ID')
```

Then initialize Airbrake under your application:
```python
from flask_airbrake import Airbrake
airbrake = Airbrake()

def create_app():
app = Flask(__name__)
airbrake.init_app(app)
return app
```
You can implement usergetter for sending custom user info from you auth implementation:
```python
@airbrake.usergetter
def get_user_dict(*args, **kwargs):
try:
user = get_current_user()
return {
"full_name": user.full_name,
"id": user.id,
"email": user.email,
"token": user.token.access_token
}
except Exception:
return {"error": "Can not get user info"}
```
Contributing
------------

TBD

TODO
------------
* Wrap the WSGI application (Airbrake Middleware).
* Unittests
* Request Parser
* Sphinx Docs

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

Flask-Airbrake-0.0.3.linux-x86_64.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

Flask_Airbrake-0.0.3-py2.py3-none-any.whl (5.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file Flask-Airbrake-0.0.3.linux-x86_64.tar.gz.

File metadata

File hashes

Hashes for Flask-Airbrake-0.0.3.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 c98efd329646d3c77e9e0260a204222b65ba64b74276c256c4dd66d0ccfcb023
MD5 c8d7776298c9370b9a6b4471cadbd23e
BLAKE2b-256 16e277d589c3d7d652bb3896fa1dfafc5eabff53dc8a2efff48708b05afdee84

See more details on using hashes here.

File details

Details for the file Flask_Airbrake-0.0.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for Flask_Airbrake-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b5a15856b47260b8da5e223077d0837a57887560a5577e65f1356c218002d314
MD5 5d1acd9fb8012a5c7d1125eff4a89fb3
BLAKE2b-256 649a8e5b6b20c2cccea8b2b96a3dbec6d5d2c7c8ed79b977313577b52f5d2b29

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