import os

basedir = os.path.abspath(os.path.dirname(__file__))

class Config:
    SECRET_KEY = os.getenv('SECRET_KEY', '')
    DEBUG = False


class DevelopmentConfig(Config):
    DEBUG = True
    SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'flask_main.db')
    SQLALCHEMY_TRACK_MODIFICATIONS = False


class TestingConfig(Config):
    DEBUG = True
    TESTING = True
    SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'flask_main.db')
    PRESERVE_CONTEXT_ON_EXCEPTION = False
    SQLALCHEMY_TRACK_MODIFICATIONS = False


class ProductionConfig(Config):
    DEBUG = False


config_by_name = dict(
    dev=DevelopmentConfig,
    test=TestingConfig,
    prod=ProductionConfig
)

key = Config.SECRET_KEY

[((37, 62), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (52, 62), False, 'import os\n'), ((96, 123), 'os.getenv', 'os.getenv', (['"""SECRET_KEY"""', '""""""'], {}), "('SECRET_KEY', '')\n", (105, 123), False, 'import os\n'), ((239, 277), 'os.path.join', 'os.path.join', (['basedir', '"""flask_main.db"""'], {}), "(basedir, 'flask_main.db')\n", (251, 277), False, 'import os\n'), ((433, 471), 'os.path.join', 'os.path.join', (['basedir', '"""flask_main.db"""'], {}), "(basedir, 'flask_main.db')\n", (445, 471), False, 'import os\n')]