def substitute_params(sql, sql_params):
    """
    Substitute SQL dict of parameter values

    Args:
        sql              : sql statement
        sql_params       : dict of parameters to substitute

    Returns:
        string containing SQL with parameters substituted in
    """

    for param_name in sql_params:
        sql = sql.replace(('{' + '{0}'.format(param_name) + '}'),
                          sql_params[param_name])
    return sql