@application.route("/students/<int:id>", methods=["GET", "POST"]) def student_by_id(id): return {"student": id} @application.route("/students") def all_students(): return {"students": "all"}