<s>[INST] from flask import Flask, request, jsonify
from flask_sqlalchemy import SQLAlchemy

app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///student.db"
db = SQLAlchemy(app)

class Student(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String, nullable=False)
    marks = db.Column(db.Integer, nullable=False)

    def __init__(self, name, marks):
        self.name = name
        self.marks = marks

@app.route('/', methods=['GET', 'POST'])
def login():
    if request.method == 'POST':
        name = request.form.get('name')
        marks = request.form.get('marks', type=int)
        user = Student(name, marks)
        db.session.add(user)
        db.session.commit()
        return jsonify({"msg": "Student added"}), 201
    else:
        students = Student.query.all()
        output = []
        for s in students:
            student_data = {'id': s.id, 'name': s.name, 'marks': s.marks}
            output.append(student_data)
        return jsonify({'students': output})

@app.route('/<string:name>')
def get_one_student(name):
    student = Student.query.filter_by(name=name).first()
    if student is None:
        return jsonify({"msg": "student not found"}), 404
    else:
        return jsonify({"id": student.id, "name": student.name, "marks": student.marks})

if __name__ == '__main__':
    app.run(debug=True)

I have this flask app, I'm trying to add some more routes to it. I'd like to be able to update and delete my students. Can you show me how?[/INST]