__author__ = "Florian Kaiser"
__copyright__ = "Copyright 2022, Project Aktienbot"
__credits__ = ["Florian Kaiser", "Florian Kellermann", "Linus Eickhof", "Kevin Pauer"]
__license__ = "GPL 3.0"
__version__ = "1.0.0"

import os
from app.schema import BaseResponseSchema

# Flask settings
SECRET_KEY = os.getenv('SECRET_KEY', 'secret string')


# Flask-SQLAlchemy settings
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
}

# openapi/Swagger config
BASE_RESPONSE_DATA_KEY = "data"
BASE_RESPONSE_SCHEMA = BaseResponseSchema

BOT_EMAIL = os.getenv('BOT_EMAIL')
BOT_USERNAME = os.getenv('BOT_USERNAME')
BOT_PASSWORD = os.getenv('BOT_PASSWORD')

ADMIN_EMAIL = os.getenv('ADMIN_EMAIL')
ADMIN_USERNAME = os.getenv('ADMIN_USERNAME')
ADMIN_PASSWORD = os.getenv('ADMIN_PASSWORD')
