123456 |
- {
- "html": "<div class=\"section\" id=\"installation\">\n<h2>Installation</h2>\n<p>If you haven’t already, start by downloading Raven. The easiest way is\nwith <em>pip</em>:</p>\n<div class=\"highlight-python\"><div class=\"highlight\" style=\"background: #ffffff\"><pre style=\"line-height: 125%\"><span></span>pip install raven --upgrade\n</pre></div>\n</div>\n</div>\n\n\n<div class=\"section\" id=\"installation\">\n<h2>Installation</h2>\n<p>If you haven’t already, install raven with its explicit Flask dependencies:</p>\n<div class=\"highlight-python\"><div class=\"highlight\" style=\"background: #ffffff\"><pre style=\"line-height: 125%\"><span></span>pip install raven[flask]\n</pre></div>\n</div>\n</div>\n\n\n<div class=\"section\" id=\"setup\">\n<h2>Setup</h2>\n<p>The first thing you’ll need to do is to initialize Raven under your application:</p>\n<div class=\"highlight-python\"><div class=\"highlight\" style=\"background: #ffffff\"><pre style=\"line-height: 125%\"><span></span><span style=\"color: #2eb0f7\">from</span> <span style=\"color: #111111\">raven.contrib.flask</span> <span style=\"color: #2eb0f7\">import</span> <span style=\"color: #111111\">Sentry</span>\n<span style=\"color: #111111\">sentry</span> <span style=\"color: #4b4f5c\">=</span> <span style=\"color: #111111\">Sentry(app,</span> <span style=\"color: #111111\">dsn</span><span style=\"color: #4b4f5c\">=</span><span style=\"color: #e8535a\">'___DSN___'</span><span style=\"color: #111111\">)</span>\n</pre></div>\n</div>\n<p>If you don’t specify the <code class=\"docutils literal\"><span class=\"pre\">dsn</span></code> value, we will attempt to read it from\nyour environment under the <code class=\"docutils literal\"><span class=\"pre\">SENTRY_DSN</span></code> key.</p>\n</div>\n",
- "link": "https://docs.getsentry.com/clients/python/integrations/flask/",
- "id": "python-flask",
- "name": "Flask"
- }
|