Retrieve the API params from the config file.
438030
def _get_api_params(api_url=None,
                    page_id=None,
                    api_key=None,
                    api_version=None):
    '''
    
    '''
    statuspage_cfg = __salt__['config.get']('statuspage')
    if not statuspage_cfg:
        statuspage_cfg = {}
    return {
        'api_url': api_url or statuspage_cfg.get('api_url') or BASE_URL,  # optional
        'api_page_id': page_id or statuspage_cfg.get('page_id'),  # mandatory
        'api_key': api_key or statuspage_cfg.get('api_key'),  # mandatory
        'api_version': api_version or statuspage_cfg.get('api_version') or DEFAULT_VERSION
    }
1270989
def _retrieve(self, config_file=None):
        """"""
        with open(config_file or _DEFAULT_PATH, 'r') as f:
            creds = json.load(f)
        self._key = creds.get('key')
        self._base_url = creds.get('base_url')
        self._username = creds.get('username')
1109509
def get_config():
    """"""
    if CONFIG_FILE is not None:
        configfile = CONFIG_FILE
    else:
        configfile = BUILTIN_CONFIG_FILE

    config = {}
    with open(configfile, 'r') as fp_:
        config = recursive_dict_update(config, yaml.load(fp_, Loader=UnsafeLoader))

    app_dirs = AppDirs('pyspectral', 'pytroll')
    user_datadir = app_dirs.user_data_dir
    config['rsr_dir'] = expanduser(config.get('rsr_dir', user_datadir))
    config['rayleigh_dir'] = expanduser(config.get('rayleigh_dir', user_datadir))

    return config
430093
def get_params(names):
    
    params = {}
    for name in names:
        value = request.form.get(name) or request.files.get(name)
        if value is not None:
            params[name] = value
    return params
17094
def get_params(self, *args, **kwargs):
        '''
        
        '''
        kwargs.update(self._data)
        if args and kwargs:
            raise ValueError('Cannot mix positional and named parameters')
        if args:
            return list(args)
        else:
            return kwargs
899000
def _extract_params(self):
        
        # Because in this endpoint we handle both GET
        # and POST request.
        query_dict = (self.request.POST if self.request.method == 'POST'
                      else self.request.GET)

        self.params['client_id'] = query_dict.get('client_id', '')
        self.params['redirect_uri'] = query_dict.get('redirect_uri', '')
        self.params['response_type'] = query_dict.get('response_type', '')
        self.params['scope'] = query_dict.get('scope', '').split()
        self.params['state'] = query_dict.get('state', '')
        self.params['nonce'] = query_dict.get('nonce', '')

        self.params['prompt'] = self._allowed_prompt_params.intersection(
            set(query_dict.get('prompt', '').split()))

        self.params['code_challenge'] = query_dict.get('code_challenge', '')
        self.params['code_challenge_method'] = query_dict.get('code_challenge_method', '')
581378
def _getParameters(self):
        """"""
        param = self.query._getParameters()
        key = self.__PATTERN_KEY % (str(self._getIndex()))
        val = self.__PATTERN_VALUE % (self.__column, self.__value)
        #self.__column.getColumnAlias()
        param.update({key:val})
        return param
331093
def _get_request_params(self, **kwargs):
        """"""
        request_params = copy.deepcopy(self._shared_request_params)
        for key, value in iteritems(kwargs):
            if isinstance(value, dict) and key in request_params:
                # ensure we don't lose dict values like headers or cookies
                request_params[key].update(value)
            else:
                request_params[key] = value
        return request_params
661283
async def get_constants(self):
        ''''''
        url = self.BASE + '/constants'

        data = await self.request(url)

        return Constants(self, data)
1060917
def config_to_api_list(dic):
  
  config = [ ]
  for k, v in dic.iteritems():
    config.append({ 'name' : k, 'value': v })
  return { ApiList.LIST_KEY : config }
201922
def _get_params(self):
        """"""
        return np.hstack((self.varianceU,self.varianceY, self.lengthscaleU,self.lengthscaleY))
393119
def get_params(self):
        
        assert self.binded and self.params_initialized

        if self._params_dirty:
            self._sync_params_from_devices()
        return (self._arg_params, self._aux_params)
1225418
private void readParamsFromFile()
   {
      PropertiesParam props = initParams.getPropertiesParam("artifact.workspace");

      if (props == null)
      {
         throw new IllegalArgumentException("Property parameters 'locations' expected");
      }

      repoWorkspaceName = props.getProperty("workspace");
      rootNodePath = props.getProperty("rootNode");

      LOG.info("Workspace from configuration file: " + repoWorkspaceName);
      LOG.info("RootNode from configuration file: " + rootNodePath);
   }
311151
def get_api_required_params(self):
        
        result = self.required_params
        if type(result) != list:
            raise ValueError(
                '{}.required_params should return list'.format(
                    self.__class__.__name__
                )
            )
        return result
481082
def get_config(config_file):
    """"""
    config_path = os.path.abspath(config_file)

    try:
        with open(config_path, 'r') as data:
            config = yaml.safe_load(data)
    except IOError as exc:
        sys.exit(str(exc))

    return config
153929
def get_params(self):
        ""
        import inspect
        a = inspect.getargspec(self.__init__)[0]
        out = dict()
        for key in a[1:]:
            value = getattr(self, "_%s" % key, None)
            out[key] = value
        return out
816944
def _get_params(func, *args, **kwargs):
    
    params = dict(zip(func.func_code.co_varnames[:len(args)], args))
    if func.func_defaults:
        params.update(dict(zip(
            func.func_code.co_varnames[-len(func.func_defaults):],
            func.func_defaults)))
    params.update(kwargs)

    return params