Skip to content

Instantly share code, notes, and snippets.

@twyle
Created June 2, 2022 10:13
Show Gist options
  • Save twyle/71b70249d07645f6523b9b9ddabd8f32 to your computer and use it in GitHub Desktop.
Save twyle/71b70249d07645f6523b9b9ddabd8f32 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
"""This module contain the confuguration for the application."""
import os
class BaseConfig():
"""Base configuration."""
SECRET_KEY = os.environ['SECRET_KEY']
DEBUG = False
TESTING = False
class TestingConfig(BaseConfig):
"""Configuration used during testing."""
SECRET_KEY = os.environ['SECRET_KEY']
DEBUG = True
TESTING = True
class DevelopmentConfig(BaseConfig):
"""Configuration used during development."""
SECRET_KEY = os.environ['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 = os.environ['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 = os.environ['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