def activedb(dbdata, active):
    """Reduce database to active entries

    Parameters
    ----------
    dbdata : List[Dict[]]
        List of database entries
    active : List
        List of stems in blacklist directory

    Returns
    -------
    List[Dict[active entries database schema]]
    """

    out = [e for e in dbdata if e['ip'] in active]
    return out