input: 
  def create_crud_api_for_blogpost(app, db):
      """ Create a basic CRUD API for the BlogPost model. The API should include endpoints for 
      creating a post, getting all posts, getting a single post, editing a post, and deleting 
      a post.
      
      Example:
      >>> app = Flask(__name__)
      >>> app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.db'
      >>> db = SQLAlchemy(app)
      >>> class BlogPost(db.Model):
      ...   id = db.Column(db.Integer, primary_key=True)
      ...   title = db.Column(db.String(200))
      ...   content = db.Column(db.Text)
      >>> create_crud_api_for_blogpost(app, db)
      # Running the app should now serve the CRUD API for BlogPost.
      """
  
output:     
      from flask import request, jsonify
  
      @app.route('/posts', methods=['POST'])
      def create_post():
          data = request.get_json()
          new_post = BlogPost(title=data['title'], content=data['content'])
          db.session.add(new_post)
          db.session.commit()
          return jsonify({'message': 'Post created successfully', 'id': new_post.id}), 201
  
      @app.route('/posts', methods=['GET'])
      def get_all_posts():
          posts = BlogPost.query.all()
          return jsonify([{'id': post.id, 'title': post.title, 'content': post.content} for post in posts])
  
      @app.route('/posts/<int:post_id>', methods=['GET'])
      def get_post(post_id):
          post = BlogPost.query.get_or_404(post_id)
          return jsonify({'id': post.id, 'title': post.title, 'content': post.content})
  
      @app.route('/posts/<int:post_id>', methods=['PUT'])
      def update_post(post_id):
          post = BlogPost.query.get_or_404(post_id)
          data = request.get_json()
          post.title = data.get('title', post.title)
          post.content = data.get('content', post.content)
          db.session.commit()
          return jsonify({'message': 'Post updated successfully'})
  
      @app.route('/posts/<int:post_id>', methods=['DELETE'])
      def delete_post(post_id):
          post = BlogPost.query.get_or_404(post_id)
          db.session.delete(post)
          db.session.commit()
          return jsonify({'message': 'Post deleted successfully'})
  