def get_kbs_info(kbtype="", searchkbname=""):
    """A convenience method.

    :param kbtype: type of kb -- get only kb's of this type
    :param searchkbname: get only kb's where this sting appears in the name
    """
    # query + order by
    query = models.KnwKB.query.order_by(
        models.KnwKB.name)
    # filters
    if kbtype:
        query = query.filter_by(kbtype=kbtype)
    if searchkbname:
        query = query.filter_by(name=searchkbname)

    return [row.to_dict() for row in query.all()]