@set_database
def delete_instances(ids, **kwargs):
 if ids:
  for item in Item.select().where(Item.id.in_(ids)):
   item.delete_instance()

@ set_database def delete_instances ( ids , ** kwargs ) : if ids : for item in Item . select ( ) . where ( Item . id . in_ ( ids ) ) : item . delete_instance ( )
given a list of item ids .