Fetch the middleware settings.

    :return dict: settings
344326
def settings():
    
    # Get the user-provided settings
    user_settings = dict(getattr(django_settings, _settings_key, {}))
    user_settings_keys = set(user_settings.keys())
    # Check for required but missing settings
    missing = _required_settings_keys - user_settings_keys
    if missing:
        raise AuthzConfigurationError(
            'Missing required {} config: {}'.format(_settings_key, missing))
    # Check for unknown settings
    unknown = user_settings_keys - _available_settings_keys
    if unknown:
        raise AuthzConfigurationError(
            'Unknown {} config params: {}'.format(_settings_key, unknown))
    # Merge defaults with provided settings
    defaults = _available_settings_keys - user_settings_keys
    user_settings.update({key: _available_settings[key] for key in defaults})

    _rectify(user_settings)
    return types.MappingProxyType(user_settings)
1113819
def middleware(func):
    
    @wraps(func)
    def parse(*args, **kwargs):
        """ get middleware from route, execute middleware in order """
        middleware = copy.deepcopy(kwargs['middleware'])
        kwargs.pop('middleware')
        if request.method == "OPTIONS":
            # return 200 json response for CORS
            return JsonResponse(200)
        if middleware is None:
            return func(*args, **kwargs)
        for mware in middleware:
            ware = mware()
            if ware.status is False:
                return ware.response
            return func(*args, **kwargs)
    return parse
425639
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return CompositionSettingsInstance(self._version, payload, )
507231
def get_config(self, service, setting):
        
        try:
            return self.get_service(service)[setting]
        except KeyError:
            return getattr(self, setting + '_DEFAULT')
650316
def get_queue_settings(self, project_key):
        
        url = 'rest/servicedeskapi/queues/{}'.format(project_key)

        return self.get(url, headers=self.experimental_headers)
506290
def get_config(cli_args=None, config_path=None):
    
    config = Config(app_name="MYAPP",
                    cli_args=cli_args,
                    config_path=config_path)
    config_dict = config.get_config()
    return config_dict
1307188
def get_settings(self):
        
        settings = {}
        for name in REMOTE_SETTINGS:
            settings[name] = self.get_option(name)

        # dataframe_format is stored without percent sign in config
        # to avoid interference with ConfigParser's interpolation
        name = 'dataframe_format'
        settings[name] = '%{0}'.format(self.get_option(name))
        return settings
1184897
def get_settings_list(self):
        """"""
        return [
            self.source,
            self.output,
            self.kwargs,
            self.post_processors,
        ]
63860
def get_setting(self, twig=None, **kwargs):
        
        if twig is not None:
            kwargs['twig'] = twig
        kwargs['context'] = 'setting'
        return self.filter_or_get(**kwargs)
751146
def get(self):
        
        resource = dict()
        resource.update(self._parse_config())
        resource.update(self._parse_interfaces())

        return resource
607347
def get_setting(self, name):
        notfound = object()
        " "
        value = getattr(config, name, notfound)
        if name.endswith('_WHITELISTED_DOMAINS'):
            if value:
                return value.split(',')
            else:
                return []

        if value is notfound:
            value = getattr(settings, name)
        # Force text on URL named settings that are instance of Promise
        if name.endswith('_URL'):
            if isinstance(value, Promise):
                value = force_text(value)
            value = resolve_url(value)
        return value
587827
def __get_settings(self):
        

        return {"case_sensitive": self.Case_Sensitive_checkBox.isChecked(),
                "whole_word": self.Whole_Word_checkBox.isChecked(),
                "regular_expressions": self.Regular_Expressions_checkBox.isChecked(),
                "backward_search": self.Backward_Search_checkBox.isChecked(),
                "wrap_around": self.Wrap_Around_checkBox.isChecked()}
24648
def get_settings(*args)
      SafeIndex.log_or_throw(:get_settings, @raise_on_failure) do
        begin
          @index.get_settings(*args)
        rescue Algolia::AlgoliaError => e
          return {} if e.code == 404 # not fatal
          raise e
        end
      end
    end
39285
def get_ldapsettings(self, domainid, serverid, settingsid):
        """"""
        return self.api_call(
            ENDPOINTS['ldapsettings']['get'],
            dict(domainid=domainid, serverid=serverid, settingsid=settingsid))
1332108
def get_values():
    

    # First load a mapping between config name and default value
    default_initial = ((name, options[0])
                       for name, options in settings.CONFIG.items())
    # Then update the mapping with actually values from the backend
    initial = dict(default_initial, **dict(config._backend.mget(settings.CONFIG)))

    return initial
340490
def get_api_settings(self):
        '''
        
        '''

        sensu_api_url = os.environ.get('SENSU_API_URL')
        if sensu_api_url:
            uri = urlparse(sensu_api_url)
            api_settings = {
                'host': '{0}://{1}'.format(uri.scheme, uri.hostname),
                'port': uri.port,
                'user': uri.username,
                'password': uri.password
            }
        else:
            api_settings = self.settings.get('api', {})
            api_settings['host'] = api_settings.get(
                'host', '127.0.0.1')
            api_settings['port'] = api_settings.get(
                'port', 4567)

        return api_settings
576793
def _parse_settings(self):
        """"""
        if hasattr(self, 'settings'):  # parse setting only one time
            return

        self.settings = {
            'auth_key': self._check_required_setting('RUMETR_TOKEN'),
            'developer': self._check_required_setting('RUMETR_DEVELOPER'),
        }
        self.settings.update(self._non_required_settings('RUMETR_API_HOST'))