-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
31 lines (23 loc) · 884 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
25
26
27
28
29
30
31
from spex_common.config import load_config
from flask import Flask
from flask_bcrypt import Bcrypt
from flask_jwt_extended import JWTManager
from flask_cors import CORS
from routes import blueprint
from flask_compress import Compress
import logging
config = load_config()
logging.getLogger("urllib3").setLevel(logging.WARNING)
logging.getLogger("werkzeug").setLevel(logging.WARNING)
logging.getLogger("matplotlib.font_manager").setLevel(logging.WARNING)
logging.getLogger("PIL.PngImagePlugin").setLevel(logging.WARNING)
logging.getLogger("matplotlib.axes._base").setLevel(logging.WARNING)
application = Flask(__name__)
Compress(application)
application.config.from_mapping(config)
bcrypt = Bcrypt(application)
jwt = JWTManager(application)
CORS(application, supports_credentials=True)
application.register_blueprint(blueprint)
if __name__ == '__main__':
application.run()