input: def manage_records_rest_api():
      """Generate a REST API with Python and Flask that allows users to create, read, update, and delete records from a database.
      Example:
      When the API is run and a POST request is made to '/records' with the body:
      {
          "name": "Sample Record"
      }
      The response should be:
      {
          "id": 1
      }
      """
output:     
      from flask import Flask, request, jsonify
      from flask_sqlalchemy import SQLAlchemy
  
      app = Flask(__name__)
      app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///records.db'
      db = SQLAlchemy(app)
  
      class Record(db.Model):
          id = db.Column(db.Integer, primary_key=True)
          name = db.Column(db.String(80), nullable=False)
  
      db.create_all()
  
      @app.route('/records', methods=['POST'])
      def create_record():
          data = request.get_json()
          new_record = Record(name=data['name'])
          db.session.add(new_record)
          db.session.commit()
          return jsonify({"id": new_record.id}), 201
  
      @app.route('/records', methods=['GET'])
      def get_records():
          records = Record.query.all()
          return jsonify([{"id": record.id, "name": record.name} for record in records])
  
      @app.route('/records/<int:id>', methods=['GET'])
      def get_record(id):
          record = Record.query.get_or_404(id)
          return jsonify({"id": record.id, "name": record.name})
  
      @app.route('/records/<int:id>', methods=['PUT'])
      def update_record(id):
          record = Record.query.get_or_404(id)
          data = request.get_json()
          record.name = data['name']
          db.session.commit()
          return jsonify({"id": record.id, "name": record.name})
  
      @app.route('/records/<int:id>', methods=['DELETE'])
      def delete_record(id):
          record = Record.query.get_or_404(id)
          db.session.delete(record)
          db.session.commit()
          return jsonify({"result": "Record deleted"})
  
      if __name__ == '__main__':
          app.run(debug=True)
  