python-flask.json 1.9 KB

123456
  1. {
  2. "html": "<div class=\"section\" id=\"installation\">\n<h2>Installation</h2>\n<p>If you haven&#8217;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&#8217;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&#8217;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\">&#39;___DSN___&#39;</span><span style=\"color: #111111\">)</span>\n</pre></div>\n</div>\n<p>If you don&#8217;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",
  3. "link": "https://docs.getsentry.com/clients/python/integrations/flask/",
  4. "id": "python-flask",
  5. "name": "Flask"
  6. }