def _sql_expand_update(self, spec, key_prefix = '', col_prefix = ''):
        sql = ', '.join(col_prefix + key + ' = %(' + key_prefix + key + ')s' for key in spec)
        params = {}
        for key in spec:
            params[key_prefix + key] = spec[key]

        return sql, params
Expand a dict so it fits in a INSERT clause
dataset/ETHPy150Open SpriteLink/NIPAP/nipap/nipap/backend.py/Nipap._sql_expand_update