Return layout.json params in a flattened dict with name param as key.
195569
def layout_json_params(self):
        """"""
        if self._layout_json_params is None:
            self._layout_json_params = {}
            for i in self.layout_json.get('inputs', []):
                for p in i.get('parameters', []):
                    self._layout_json_params.setdefault(p.get('name'), p)
        return self._layout_json_params
731622
def to_dict(self):
        """"""
        if not self.url:
            return None
        return {
            'url': self.url,
            'width': self.width,
            'height': self.height
        }
1144311
def _format_dict(result):
    """"""

    table = KeyValueTable(['name', 'value'])
    table.align['name'] = 'r'
    table.align['value'] = 'l'

    for key, value in result.items():
        value = iter_to_table(value)
        table.add_row([key, value])

    return table
1097400
def _layout(dict_vars, dict_vars_extra):
    """"""
    desc = [(v, m.description) for v, m in dict_vars.items()]
    desc.extend((v, baredoc(m.description))
                for v, m in dict_vars_extra.items())
    _pretty_print(desc, min_col_width=26)
551784
def MapParamNames(params, request_type):
    """"""
    return [encoding.GetCustomJsonFieldMapping(request_type, json_name=p) or p
            for p in params]
769526
def params(self):
        
        params = MultiDict(self.GET)
        for key, value in self.forms.iterallitems():
            params[key] = value
        return params
1241844
def get_params(self):
        
        return odict([(key,param.value) for key,param in self.params.items()])
397329
def to_flat_dict(self, **kwargs):
        
        if kwargs:
            return self.filter(**kwargs).to_flat_dict()
        return {param.uniquetwig: param for param in self._params}
319659
def _convert_params(self, parameters):
        
        if isinstance(parameters, dict):
            return [self.make_param(name, value)
                    for name, value in parameters.items()]
        else:
            params = []
            for parameter in parameters:
                params.append(self.make_param('', parameter))
            return params
417532
def as_dict(self):
        """"""
        dicts = [x.as_dict for x in self.children]
        return {'{0} {1}'.format(self.name, self.value): dicts}
992100
def get_from_params(request, key):
    
    data = getattr(request, 'json', None) or request.values
    value = data.get(key)
    return to_native(value)
444905
def get_parameters(self):
        
        d = {}
        for k in ['label', 'verbose_name', 'required', 'hint', 'placeholder', 'choices',
            'default', 'validators', 'max_length']:
            d[k] = getattr(self, k)
        return d
959148
def param_dict_to_str(data):
    """"""
    if data is None or not data:
        return ""
    pairs = []
    for key, val in data.items():
        if isinstance(val, (list, tuple, set)) or is_numpy_1d_array(val):
            pairs.append(str(key) + '=' + ','.join(map(str, val)))
        elif isinstance(val, string_type) or isinstance(val, numeric_types) or is_numeric(val):
            pairs.append(str(key) + '=' + str(val))
        elif val is not None:
            raise TypeError('Unknown type of parameter:%s, got:%s'
                            % (key, type(val).__name__))
    return ' '.join(pairs)
1111618
def get_api_params(self):
        
        result = self.params
        if type(result) != dict:
            raise ValueError(
                '{}.params should return dictionary'.format(
                    self.__class__.__name__
                )
            )
        return result
286632
def dict_from_locals(self, name, params: List[Parameter], not_specified_literal=Constants.VALUE_NOT_SET):
        
        code = self.block(f"{name} = {{}}")
        for p in params:
            code.add(
                self.block(f"if {p.name} is not {not_specified_literal}:").of(
                    f"{name}[{p.name!r}] = {p.name}"
                ),
            )
        return code
782338
def _system_parameters(**kwargs):
    
    return {key: value for key, value in kwargs.items()
            if (value is not None or value == {})}
1121061
def params(self):
        
        params = FormsDict()
        for key, value in self.query.iterallitems():
            params[key] = value
        for key, value in self.forms.iterallitems():
            params[key] = value
        return params