Flask-Airbrake
===============================
[](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
===============================
[](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
Metadata
Release files for Flask-Airbrake 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| Flask-Airbrake-0.0.3.linux-x86_64.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Flask_Airbrake-0.0.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 9.5 kB
Release files / Flask-Airbrake-0.0.3.linux-x86_64.tar.gz
| Download URL | Flask-Airbrake-0.0.3.linux-x86_64.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c98efd329646d3c77e9e0260a204222b65ba64b74276c256c4dd66d0ccfcb023
|
|
BLAKE2b-256 checksum How to use checksums |
16e277d589c3d7d652bb3896fa1dfafc5eabff53dc8a2efff48708b05afdee84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / Flask_Airbrake-0.0.3-py2.py3-none-any.whl
| Download URL | Flask_Airbrake-0.0.3-py2.py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b5a15856b47260b8da5e223077d0837a57887560a5577e65f1356c218002d314
|
|
BLAKE2b-256 checksum How to use checksums |
649a8e5b6b20c2cccea8b2b96a3dbec6d5d2c7c8ed79b977313577b52f5d2b29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |