diff --git a/server/lib/python/cartodb_services/cartodb_services/refactor/core/environment.py b/server/lib/python/cartodb_services/cartodb_services/refactor/core/environment.py new file mode 100644 index 0000000..5d33d95 --- /dev/null +++ b/server/lib/python/cartodb_services/cartodb_services/refactor/core/environment.py @@ -0,0 +1,13 @@ +class Environment: + def __init__(self, server_config_storage): + self._server_config_storage = server_config_storage + + def get(self): + server_config = self._server_config_storage.get('server_conf') + + if not server_config or 'environment' not in server_config: + environment = 'development' + else: + environment = server_config['environment'] + + return environment