Reformatting
This commit is contained in:
@@ -4,21 +4,19 @@ __credits__ = ["Florian Kaiser", "Florian Kellermann", "Linus Eickhof", "Kevin P
|
||||
__license__ = "GPL 3.0"
|
||||
__version__ = "1.0.0"
|
||||
|
||||
from flask import current_app
|
||||
from apiflask import APIFlask
|
||||
|
||||
from dotenv import load_dotenv
|
||||
from flask_cors import CORS
|
||||
|
||||
from app.blueprints.keyword import keyword_blueprint
|
||||
from app.blueprints.portfolio import portfolio_blueprint
|
||||
from app.blueprints.shares import shares_blueprint
|
||||
from app.blueprints.share_price import share_price_blueprint
|
||||
from app.blueprints.transactions import transaction_blueprint
|
||||
from app.blueprints.shares import shares_blueprint
|
||||
from app.blueprints.telegram import telegram_blueprint
|
||||
from app.blueprints.transactions import transaction_blueprint
|
||||
from app.blueprints.user import users_blueprint
|
||||
from app.helper_functions import hash_password
|
||||
from app.models import *
|
||||
from dotenv import load_dotenv
|
||||
from flask import current_app
|
||||
from flask_cors import CORS
|
||||
|
||||
|
||||
def create_app(config_filename=None):
|
||||
|
@@ -4,10 +4,9 @@ __credits__ = ["Florian Kaiser", "Florian Kellermann", "Linus Eickhof", "Kevin P
|
||||
__license__ = "GPL 3.0"
|
||||
__version__ = "1.0.0"
|
||||
|
||||
from flask import current_app
|
||||
|
||||
import jwt
|
||||
from apiflask import HTTPTokenAuth
|
||||
from flask import current_app
|
||||
|
||||
auth = HTTPTokenAuth()
|
||||
|
||||
|
@@ -7,12 +7,11 @@ __version__ = "1.0.0"
|
||||
import os
|
||||
|
||||
from apiflask import APIBlueprint, abort
|
||||
|
||||
from app.auth import auth
|
||||
from app.db import database as db
|
||||
from app.helper_functions import make_response, get_email_or_abort_401
|
||||
from app.auth import auth
|
||||
from app.schema import KeywordResponseSchema, KeywordSchema, DeleteSuccessfulSchema
|
||||
from app.models import Keyword
|
||||
from app.schema import KeywordResponseSchema, KeywordSchema, DeleteSuccessfulSchema
|
||||
|
||||
keyword_blueprint = APIBlueprint('keyword', __name__, url_prefix='/api')
|
||||
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
||||
|
@@ -15,9 +15,9 @@ SECRET_KEY = os.getenv('SECRET_KEY', 'secret string')
|
||||
SQLALCHEMY_DATABASE_URI = "mysql+pymysql://" + os.getenv('MYSQL_USER') + ":" + os.getenv('MYSQL_PASSWORD') + "@" + os.getenv('MYSQL_HOST') + ":" + os.getenv('MYSQL_PORT', '3306') + "/" + os.getenv('MYSQL_NAME', 'aktienbot')
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = False # Avoids SQLAlchemy warning
|
||||
SQLALCHEMY_ENGINE_OPTIONS = {
|
||||
'pool_size': 10,
|
||||
'pool_recycle': 60,
|
||||
'pool_pre_ping': True
|
||||
'pool_size': 10,
|
||||
'pool_recycle': 60,
|
||||
'pool_pre_ping': True
|
||||
}
|
||||
|
||||
# openapi/Swagger config
|
||||
|
@@ -15,8 +15,8 @@ SECRET_KEY = os.getenv('SECRET_KEY', 'secret string')
|
||||
SQLALCHEMY_DATABASE_URI = "mysql+pymysql://" + os.getenv('MYSQL_USER') + ":" + os.getenv('MYSQL_PASSWORD') + "@" + os.getenv('MYSQL_HOST') + ":" + os.getenv('MYSQL_PORT', '3306') + "/" + os.getenv('MYSQL_NAME', 'aktienbot_test')
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = False # Avoids SQLAlchemy warning
|
||||
SQLALCHEMY_ENGINE_OPTIONS = {
|
||||
'pool_size': 100,
|
||||
'pool_recycle': 240 # 4 minutes
|
||||
'pool_size': 100,
|
||||
'pool_recycle': 240 # 4 minutes
|
||||
}
|
||||
|
||||
# openapi/Swagger config
|
||||
|
Reference in New Issue
Block a user