import os from dotenv import load_dotenv from scheme import BaseResponseSchema load_dotenv() class ConfigClass(object): """ Flask application config """ # Flask settings SECRET_KEY = os.getenv('SECRET_KEY') # Flask-SQLAlchemy settings SQLALCHEMY_DATABASE_URI = "mysql+pymysql://" + \ os.getenv('MYSQL_USER') + ":" + \ os.getenv('MYSQL_PASSWORD') + "@" + \ os.getenv('MYSQL_HOST') + ":" + \ (os.getenv("MYSQL_PORT") or str(3306)) + "/" + \ os.getenv('MYSQL_DATABASE') SQLALCHEMY_TRACK_MODIFICATIONS = False # Avoids SQLAlchemy warning # openapi/Swagger config SPEC_FORMAT = 'yaml' SERVERS = [ { "name": "Production", "url": "https://aktienbot.flokaiser.com" }, { "name": "Local", "url": "http://127.0.0.1:5000" } ] INFO = { 'description': 'Webengineering 2 | Telegram Aktienbot', 'version': '0.0.1' # 'termsOfService': 'http://example.com', # 'contact': { # 'name': 'API Support', # 'url': 'http://www.example.com/support', # 'email': 'support@example.com' # }, # 'license': { # 'name': 'Apache 2.0', # 'url': 'http://www.apache.org/licenses/LICENSE-2.0.html' # } } BASE_RESPONSE_DATA_KEY = "data" BASE_RESPONSE_SCHEMA = BaseResponseSchema