def put_raw(): text = request.data balance = Balance.from_raw(text) dbutil.clear_all() for item in balance.items: dbutil.add_item(item)