This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/config_app/config_util/config/__init__.py
Sam Chow db757edcd2 Create transient config provider, temp dir logic
Allows us to have a new config provider for each setup, with no overlap
of the directories used, and automatic cleanup of those directories.
2018-06-28 13:58:57 -04:00

12 lines
543 B
Python

from config_app.config_util.config.fileprovider import FileConfigProvider
from config_app.config_util.config.testprovider import TestConfigProvider
from config_app.config_util.config.TransientDirectoryProvider import TransientDirectoryProvider
def get_config_provider(config_volume, yaml_filename, py_filename, testing=False):
""" Loads and returns the config provider for the current environment. """
if testing:
return TestConfigProvider()
return TransientDirectoryProvider(config_volume, yaml_filename, py_filename)