-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
71 lines (61 loc) · 1.94 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
"""airbrake-flask - Airbrake client for Python Flask
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
"""
classifiers = """\
Development Status :: 5 - Production/Stable
Environment :: Console
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 2
Topic :: Software Development :: Quality Assurance
Topic :: Software Development :: Testing
""".splitlines()
from setuptools import setup
from airbrake import __version__, __app_url__, __app_name__
doc = __doc__.splitlines()
setup(
name=__app_name__,
version=__version__,
packages=['airbrake'],
zip_safe=False,
author='Kien Pham, Kane Kim',
author_email='[email protected]',
url=__app_url__,
license='MIT',
description=doc[0],
long_description='\n'.join(doc[2:]),
install_requires=['requests', 'six'],
extras_require={
'test': [
'nose',
'coverage',
'mock',
'blinker',
'Flask',
'gevent'
]
},
test_suite="tests",
keywords='error airbrake flask exception',
classifiers=classifiers
)