

def get_ids(modelclass, idlist):
    assert (type(idlist) is list)
    if (not idlist):
        return []
    idlist = [int(i) for i in idlist]
    return dbsession.query(modelclass).filter(modelclass.id.in_(idlist)).all()

dataset/ETHPy150Open kdart/pycopia/storage/pycopia/db/webhelpers.py get_ids/original