File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ Flask == 1.1.2
2+ sentry-sdk [flask ]== 0.15.1
Original file line number Diff line number Diff line change 1+ # app.py
2+ from flask import Flask , escape , request
3+
4+
5+ app = Flask (__name__ )
6+
7+
8+ @app .route ('/divide/<int:numerator>/by/<int:denominator>/' )
9+ def hello (numerator , denominator ):
10+ answer = numerator / denominator
11+ return f'{ numerator } can be divided by { denominator } { answer } times.'
Original file line number Diff line number Diff line change 1+ # app.py
2+ import os
3+ import sentry_sdk
4+ from flask import Flask , escape , request
5+ from sentry_sdk .integrations .flask import FlaskIntegration
6+
7+
8+ sentry_sdk .init (
9+ dsn = "https://{}.ingest.sentry.io/{}" .format (os .getenv ('SENTRY_KEY' ),
10+ os .getenv ('SENTRY_APP_ID' )),
11+ integrations = [FlaskIntegration ()]
12+ )
13+
14+
15+ app = Flask (__name__ )
16+
17+
18+ @app .route ('/divide/<int:numerator>/by/<int:denominator>/' )
19+ def hello (numerator , denominator ):
20+ answer = numerator / denominator
21+ return f'{ numerator } can be divided by { denominator } { answer } times.'
You can’t perform that action at this time.
0 commit comments