ParkinsonDetection / config.py
Genos77's picture
first commit
e9ee222
raw
history blame contribute delete
814 Bytes
import os
from dotenv import load_dotenv
# Find the .env file in the root directory
basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))
# Now we can simply read the variables from the environment
class Config:
# Secret key for session management
SECRET_KEY = os.environ.get('SECRET_KEY')
# Database configuration
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL')
SQLALCHEMY_TRACK_MODIFICATIONS = False
# Email configuration
MAIL_SERVER = os.environ.get('MAIL_SERVER')
MAIL_PORT = int(os.environ.get('MAIL_PORT') or 587)
MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS') == '1'
MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD')
ADMINS = [os.environ.get('MAIL_USERNAME')]