def status(self): sms_id = request.params.get('id') sms = SMS.get(sms_id) sms.delivery_status = request.params.get('status') sms.delivered = datetime.utcnow() meta.Session.commit()