Created
May 18, 2022 14:56
-
-
Save twyle/bd8210882e8f3fc19618086fd4180999 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
# -*- coding: utf-8 -*- | |
"""This module contain the confuguration for the application.""" | |
import os | |
from dotenv import load_dotenv | |
load_dotenv() | |
class BaseConfig(): | |
"""Base configuration.""" | |
SECRET_KEY = 'SECRET_KEY' | |
DEBUG = False | |
TESTING = False | |
BASE_DIR = os.path.abspath(os.path.dirname(__file__)) | |
class TestingConfig(BaseConfig): | |
"""Configuration used during testing.""" | |
SECRET_KEY = 'SECRET_KEY' | |
DEBUG = True | |
TESTING = True | |
class DevelopmentConfig(BaseConfig): | |
"""Configuration used during development.""" | |
SECRET_KEY = 'SECRET_KEY' | |
DEBUG = True | |
TESTING = False | |
CLIENT_ID = os.environ['CLIENT_ID'] | |
CLIENT_SECRET = os.environ['CLIENT_SECRET'] | |
class StagingConfig(BaseConfig): | |
"""Configuration used during staging.""" | |
SECRET_KEY = 'SECRET_KEY' | |
DEBUG = True | |
TESTING = False | |
CLIENT_ID = os.environ['CLIENT_ID'] | |
CLIENT_SECRET = os.environ['CLIENT_SECRET'] | |
class ProductionConfig(BaseConfig): | |
"""Configuration used during production.""" | |
SECRET_KEY = 'SECRET_KEY' | |
DEBUG = False | |
TESTING = False | |
CLIENT_ID = os.environ['CLIENT_ID'] | |
CLIENT_SECRET = os.environ['CLIENT_SECRET'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment