Python errors Catcher module for Hawk.so.
Usage
Register an account and get a new project token.
Install module
Install hawkcatcher from PyPI.
$ pip install hawkcatcher
Import Catcher module to your project.
from hawkcatcher import Hawk
Then enable Hawk Catcher with your token and domain.
hawk = Hawk({
'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcm9qZWN0SWQiOiI1ZTZmNWM3NzAzOWI0MDAwMjNmZDViODAiLCJpYXQiOjE1ODQzNTY0NzF9.t-5Gelx3MgHVBrxTsoMyPQAdQ6ufVbPsts9zZLW3gM8',
'host': 'localhost:3000',
'path': '/',
'secure': False,
})
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
To init Hawk Catcher just pass a project token.
hawk = Hawk('1234567-abcd-8901-efgh-123456789012')
Additional params
If you need to use custom Hawk server then pass a dictionary with params.
hawk = Hawk({
'token': '1234567-abcd-8901-efgh-123456789012',
'host': 'hawk.so',
'secure': True,
})
Requirements
Python >= 3.5
requests
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
Metadata
Release files for hawkcatcher 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hawkcatcher-2.0.0.tar.gz | 3.9 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hawkcatcher-2.0.0-py3.7.egg | Legacy Egg format | - | - | Details |
| hawkcatcher-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.6 kB
Release files / hawkcatcher-2.0.0.tar.gz
| Download URL | hawkcatcher-2.0.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86b5675e8c647104522b18fa6abb3ca1e3c940fb52ff31a2a0af4f4498d5ca77
|
|
BLAKE2b-256 checksum How to use checksums |
a7e0acfc2c83f60ace60682703840b8d1f7e8263e784556989fe522e242482dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.1
|
Release files / hawkcatcher-2.0.0-py3.7.egg
| Download URL | hawkcatcher-2.0.0-py3.7.egg |
|---|---|
| Size | 6.0 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
545f4d62dd9681eb5131dc7863268eeb32cac51998e395ce67d07b238d944980
|
|
BLAKE2b-256 checksum How to use checksums |
ac7f253c504893f9774aeedb555e9b21e57b2f67243d19ee76803da7e65c5d18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.1
|
Release files / hawkcatcher-2.0.0-py3-none-any.whl
| Download URL | hawkcatcher-2.0.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a2cdf8c183d62e62d9debcccefc9f558acdf4ed008a9091d15353a2bb82d3999
|
|
BLAKE2b-256 checksum How to use checksums |
4ab2937b80c4c9b7f56268df45e9744ce163939fa8fea9c3963709b6e94860f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.1
|