Gets the setting value as a :class:`urllib.parse.ParseResult`.

        :rtype: urllib.parse.ParseResult
352112
def geturi(self, key, **kwargs):
        

        return self.get(key, cast_func=urlparse, **kwargs)
1252417
def get_settings_from_environment(environ):
    ''''''
    settings = {}
    for name, value in environ.items():
        if not name.startswith('DJANGO_'):
            continue
        name = name.replace('DJANGO_', '', 1)
        if _ignore_setting(name):
            continue
        try:
            settings[name] = ast.literal_eval(value)
        except (SyntaxError, ValueError) as err:
            LOGGER.warn("Unable to parse setting %s=%s (%s)", name, value, err)
    return settings
1329166
def retrieve_value(self, name, default_value=None):
        """"""
        value = self.spine.send_query("retrieveSetting", self.group, name, processes=["kervi-main"])
        if value is None:
            return default_value
        elif isinstance(value, list) and len(value) == 0:
            return default_value
        elif isinstance(default_value, int):
            return int(value)
        elif isinstance(default_value, float):
            return float(value)
        else:
            return value
1323834
def get(name, import_str=False):
    
    value = None
    default_value = getattr(default_settings, name)

    try:
        value = getattr(settings, name)
    except AttributeError:
        if name in default_settings.required_attrs:
            raise Exception('You must set ' + name + ' in your settings.')

    if isinstance(default_value, dict) and value:
        default_value.update(value)
        value = default_value
    else:
        if value is None:
            value = default_value
        value = import_from_str(value) if import_str else value

    return value
149614
def set_value(self, value):
        
        parsed_value = self._parse_value(value)
        self.value = parsed_value
1046359
def _getter(self):
        
        def get_attr_value(obj):
            attr_str_value = obj.get(self._clark_name)
            if attr_str_value is None:
                return self._default
            return self._simple_type.from_xml(attr_str_value)
        get_attr_value.__doc__ = self._docstring
        return get_attr_value
1210821
def parse(self):
        

        self._config = _Config()

        self._setDefaults()

        for parser in self.parsers:
            for key, value in parser.parse(self, self._config).items():
                key = self._sanitizeName(key)
                if key not in self.configs:
                    raise UnknownConfigurationException(key)
                if value is not None:
                    self._setConfig(key, value)

        self._ensureRequired()
        self._cast()

        return self._config
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)
362253
def get_formatted_value(self, value):
        

        def get_formatter(parser_desc):
            try:
                return parser_desc['formatter']
            except TypeError:
                if isinstance(parser_desc, str):
                    try:
                        return get_formatter(self.date_parsers[parser_desc])
                    except KeyError:
                        return parser_desc
                else:
                    pass
            except KeyError:
                try:
                    if isinstance(parser_desc['parser'], str):
                        return parser_desc['parser']
                except KeyError:
                    pass

        formatter = get_formatter(self.parse_format)

        if formatter is None:
            return str(value)

        if callable(formatter):
            return formatter(value)

        return value.strftime(format=formatter)
573707
def get_default_value(self):
        
        default = self.default_value
        if isinstance(default, collections.Callable):
            default = default()
        return default
1094254
def _match_setters(self, query):
        
        q = query.decode('utf-8')
        for name, parser, response, error_response in self._setters:
            try:
                value = parser(q)
                logger.debug('Found response in setter of %s' % name)
            except ValueError:
                continue

            try:
                self._properties[name].set_value(value)
                return response
            except ValueError:
                if isinstance(error_response, bytes):
                    return error_response
                return self.error_response('command_error')

        return None
543023
def _to_python(cls, setting, raw_value):
        

        type_fn = cls.TYPE_FUNCTIONS.get(setting["type"], setting["type"])

        try:
            value = type_fn(raw_value)
        except ValueError:
            # Shouldn't occur, but just a safeguard in case
            # the db value somehow ended up as an invalid type.
            warn("The setting %s should be of type %s, but the value "
                 "retrieved from the database (%s) could not be converted. "
                 "Using the default instead: %s"
                 % (setting["name"], setting["type"].__name__,
                    repr(raw_value), repr(setting["default"])))
            value = setting["default"]

        return value
350588
def get_value(self, default=None):
        
        if default is None:
            default = []

        try:
            text = literal_eval(self.text())
            if not isinstance(text, list):
                pass
                # raise ValueError

        except ValueError:
            lg.debug('Cannot convert "' + str(text) + '" to list. ' +
                     'Using default ' + str(default))
            text = default
            self.set_value(text)

        return text
813581
def get_result(self):
        
        self._process()
        if not self.has_result:
            raise NoResult
        return self.res_queue.popleft()
1017506
def get_settings(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.get_settings(index=self._name, **kwargs)
1221186
def print_setting(self) -> str:
        
        ret = "\n"
        ret += "==================== Setting of {} ============================\n".format(self.configuration['name'])
        ret += "{}".format(self.setting)
        ret += "===============================================================\n"
        ret += "{}".format(self._var_form.setting)
        ret += "===============================================================\n"
        return ret
739436
def get_values(self, dtype=None):
        
        if is_object_dtype(dtype):
            return self.values.astype(object)
        return self.values