Created
July 30, 2022 15:15
-
-
Save gajanan0707/c45316eef1b2217ec9e0fe686ef378e9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Flask configuration variables.""" | |
from os import environ, path | |
from dotenv import load_dotenv | |
basedir = path.abspath(path.dirname(__file__)) | |
load_dotenv(path.join(basedir, ".env")) | |
class Config: | |
"""Set Flask configuration from .env file.""" | |
# General Config | |
SECRET_KEY = environ.get("SECRET_KEY") | |
FLASK_APP = environ.get("FLASK_APP") | |
FLASK_ENV = environ.get("FLASK_ENV") | |
# Database | |
SQLALCHEMY_DATABASE_URI = environ.get("SQLALCHEMY_DATABASE_URI") | |
SQLALCHEMY_ECHO = False | |
SQLALCHEMY_TRACK_MODIFICATIONS = False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment