def get_format_type(conf, logger, key, default):
    format_type = conf.get(key, default).lower()
    if format_type not in ('json', 'csv'):
        logger.warning(
            _("Invalid Parameter %s: %s, " % (key, format_type) +
              "use default %s.") % default)
        format_type = default
    return format_type
Used for hooking up the all endpoints (including custom ones), this
dataset/ETHPy150Open notmyname/slogging/slogging/common.py/get_format_type--crossover with--dataset/ETHPy150Open toastdriven/restless/restless/resources.py/Resource.as_view