from typing import Dict


def order_by(columns: Dict[str, bool]) -> str:
    """
    Generates ``ORDER BY`` clause from columns and directions.

    :param columns: Columns and directions. Iteration order is kept in rendered clause.
    :returns: ``ORDER BY`` clause.
    """
    def col(cd):
        return f"{cd[0]} ASC" if cd[1] else f"{cd[0]} DESC"
    return '' if len(columns) == 0 else f"ORDER BY {', '.join(map(col, columns.items()))}"