Skip to main content

Python errors Catcher module for Hawk.

Project description

Hawk Python Catcher

Python errors Catcher module for


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(

Now all global errors would be sent to Hawk.


If you want to catch errors in try-except blocks then use hawk.catch() in except:


Manual sending

You can also pass event to the hawk.send() call, for example:

    hawk.send(ValueError("error description"))

Event context

It is possible to pass additional event context for debugging purposes:

    hawk.send(ValueError("error description"), {"params": "value"})

Affected user

You can also pass user, who affected with specific error:

    hawk.send(ValueError("error description"), {"params": "value"}, {"id": 123})

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',
    'collector_endpoint': 'https://<id>',


  • Python >= 3.5
  • requests



Report a bug:

PyPI Package:

CodeX Team:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for hawkcatcher, version 3.4.0
Filename, size File type Python version Upload date Hashes
Filename, size hawkcatcher-3.4.0-py3-none-any.whl (9.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size hawkcatcher-3.4.0.tar.gz (7.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page