import os
from dotenv import load_dotenv

__ALREADY_IMPORTED = False

if not __ALREADY_IMPORTED:
    load_dotenv()
    __ALREADY_IMPORTED = True


class Config(object):
    if not os.getenv("secret_key"):
        raise Exception("Must be setted the 'secret_key' env var")
    SECRET_KEY=os.getenv("secret_key")

class DevelopmentConfig(Config):
    DEBUG=True
    if not os.getenv("sql_uri"):
        raise Exception("Must be setted the 'sql_url' env var")
    SQLALCHEMY_DATABASE_URI = os.getenv("sql_uri")
    SQLALCHEMY_TRACK_MODIFICATIONS = False
