db757edcd2
Allows us to have a new config provider for each setup, with no overlap of the directories used, and automatic cleanup of those directories.
12 lines
543 B
Python
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)
|