-
Notifications
You must be signed in to change notification settings - Fork 5
/
app.py
24 lines (18 loc) · 594 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Blog configuration values.
import sentry_sdk
from flask import Flask
from playhouse.flask_utils import FlaskDB
from playhouse.pool import PooledMySQLDatabase
from sentry_sdk.integrations.flask import FlaskIntegration
import config
DATABASE = PooledMySQLDatabase("se-simulator", **config.db)
if config.sentryDSN:
sentry_sdk.init(
dsn=config.sentryDSN,
integrations=[FlaskIntegration()]
)
# Create a Flask WSGI app and configure it using values from the module.
app = Flask(__name__)
app.config.from_object(__name__)
flask_db = FlaskDB(app)
db = flask_db.database