Python errors Catcher module for Hawk.
Project description
Python errors Catcher module for Hawk.so.
Usage
First of all, you should register an account on hawk.so.
Then register your project.
You’ll get token for the project on email or you can just copy it on settings page.
Install module
Install hawkcatcher from PyPI.
$ pip3 install hawkcatcher
Import Catcher module to your project.
from hawkcatcher import hawk
Then enable Hawk Catcher with your token.
hawk.enable('1234567-abcd-8901-efgh-123456789012')
Now all global errors would be sent to Hawk.
Try-except
If you want to catch errors in try-except blocks then use hawk.catch() in except:
try:
...
except:
hawk.catch()
Init params
There are two way to init Hawk module.
Token
Just enter a project token.
hawk.enable('1234567-abcd-8901-efgh-123456789012')
Params dictionary
If you need to use custom Hawk server.
hawk.enable({
'token': '1234567-abcd-8901-efgh-123456789012',
'domain': 'myproject.codex',
'host': 'hawk.so',
'path': 'catcher/python',
'secure': True,
})
Links
Repository: https://github.com/codex-team/hawk.python
Report a bug: https://github.com/codex-team/hawk.python/issues
PyPI Package: https://pypi.python.org/pypi/hawkcatcher
CodeX Team: https://ifmo.su
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.