def get_settings_by_keyword(keyword=None):
    """Get the settings associated to the specified keyword or, if
     keyword is None, get all the settings.

    :param keyword: settings to be retrieved
    :return: dictionary with the settings plus a key to identify from which
    keyword where retrieved.
    """
    settings = []
    if keyword is None:
        # iterate over all the schemas to return all settings
        for key, ischemas in CONTROLPANEL_INTERFACE_MAPPING.items():
            settings_from_ifaces = map(get_settings_from_interface, ischemas)
            settings_from_key = {k: v for d in settings_from_ifaces for k, v in d.items()}
            settings.append({key: settings_from_key,
                             "api_url": url_for("senaite.jsonapi.v1.settings", key=key)})
        return settings
    # if keyword has value then get only the settings associated to the key
    settings_from_ifaces = map(get_settings_from_interface, CONTROLPANEL_INTERFACE_MAPPING[keyword])
    settings_from_key = {k: v for d in settings_from_ifaces for k, v in d.items()}
    settings.append({keyword: settings_from_key,
                     "api_url": url_for("senaite.jsonapi.v1.settings", key=keyword)})
    return settings
def get_settings_by_keyword ( keyword = None ) : settings = [ ] if keyword is None : for key , ischemas in CONTROLPANEL_INTERFACE_MAPPING . items ( ) : settings_from_ifaces = map ( get_settings_from_interface , ischemas ) settings_from_key = { k : v for d in settings_from_ifaces for k , v in d . items ( ) } settings . append ( { key : settings_from_key , "api_url" : url_for ( "senaite.jsonapi.v1.settings" , key = key ) } ) return settings settings_from_ifaces = map ( get_settings_from_interface , CONTROLPANEL_INTERFACE_MAPPING [ keyword ] ) settings_from_key = { k : v for d in settings_from_ifaces for k , v in d . items ( ) } settings . append ( { keyword : settings_from_key , "api_url" : url_for ( "senaite.jsonapi.v1.settings" , key = keyword ) } ) return settings
Get the settings associated to the specified keyword or, if
     keyword is None, get all the settings.

    :param keyword: settings to be retrieved
    :return: dictionary with the settings plus a key to identify from which
    keyword where retrieved.