{ "html": "
\n

Installation

\n

If you haven’t already, start by downloading Raven. The easiest way is\nwith pip:

\n
pip install raven --upgrade\n
\n
\n
\n\n\n
\n

Capture an Error

\n

The most basic use for raven is to record one specific error that occurs:

\n
from raven import Client\n\nclient = Client('___DSN___')\n\ntry:\n    1 / 0\nexcept ZeroDivisionError:\n    client.captureException()\n
\n
\n
\n\n\n
\n

Reporting an Event

\n

To report an arbitrary event you can use the\ncapture() method. This is the most low-level\nmethod available. In most cases you would want to use the\ncaptureMessage() method instead however which\ndirectly reports a message:

\n
client.captureMessage('Something went fundamentally wrong')\n
\n
\n
\n", "link": "https://docs.getsentry.com/clients/python/", "id": "python", "name": "Python" }