"""The Application settings.""" from os import environ, pardir from os.path import abspath, dirname, join class Base: """The base configuration.""" DEBUG = False JSON_AS_ASCII = False APP_DIR = abspath(dirname(__file__)) PROJECT_ROOT = abspath(join(APP_DIR, pardir)) SWAGGER_DIR = abspath(join(PROJECT_ROOT, "swagger_docs")) REDIS_HOST = environ["REDIS_HOST"] REDIS_PORT = environ["REDIS_PORT"] REDIS_SESSION_DB = int(environ["REDIS_SESSION_DB"]) CELERY_BROKER_URL = environ["CELERY_BROKER_URL"] CELERY_RESULT_BACKEND = environ["CELERY_RESULT_BACKEND"] class Development(Base): """The Development configuration.""" ENV = "development" DEBUG = True CELERY_ALWAYS_EAGER = True class Testing(Base): """The testing configuration.""" ENV = "testing" class Production(Base): """The production configuration.""" ENV = "production" CONFIG = { "development": Development, "testing": Testing, "production": Production, }