

def mk_user(email, password, is_public, is_active, is_admin):
    role = Roles.get(('ADMIN' if is_admin else 'USER'))
    user = User(email=email, password=password, is_public=is_public, is_active=is_active, role=role)
    db.session.add(user)
    db.session.commit()
    return user

dataset/ETHPy150Open tooxie/shiva-server/shiva/admin.py mk_user/original