forked from bigmlcom/tornadotoad
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.txt
executable file
·49 lines (32 loc) · 1.44 KB
/
README.txt
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
==================
tornadotoad v 0.3
==================
tornadotoad allows one to integrate HoptoadApp.com's service to track exceptions
inside a tornadoapp. It can be used outside of a running tornado app, but having
tornado installed is one of the requirements. If there is an ioloop running, the
request will be asynchronous.
Installation:
------------------
You can use pip to install:
pip install tornadotoad
Basic Usage:
------------------
1) Specify the API key and environment. Usually done once before starting up the iolooop.
import tornadotoad
tornadotoad.register(api_key='your-api-key', environment='production')
2) Add the tornadotoad mixin to your RequestHandler.
import tornadotoad
class BaseHandler(tornadotoad.mixin.RequestHandler, tornado.web.RequestHandler):
pass
Everytime your application throws an error, the error details will be sent off asynchronously
to Hoptoad.
Send deploy notification
------------------
When hoptoad receives a deploy notification, it will clear all the errors for the environment
you have registered.
import tornadotoad
tornadotoad.register(api_key='your-api-key', environment='production')
client = tornadotoad.api.TornadoToad()
client.deploy()
Alternate Hoptoad servers can be specified with the `host` option to register, for example:
tornadotoad.register(api_key='your-api-key', environment='production', host='alternate-hoptoad-host.example.com')