input: Write a function to implement a basic CRUD API for the BlogPost model using Python and Flask. The API should include endpoints for creating a post, getting all posts, getting a single post, editing a post, and deleting a post. The function should return the Flask application object.
  
  assert app.__name__=='__main__'
  assert app.config['SQLALCHEMY_DATABASE_URI']=='sqlite:///test.db'
  assert 'BlogPost' in db.Model.__subclasses__()
  assert app.url_map.url_for('create_post')=='/post'
  assert app.url_map.url_for('get_posts')=='/posts'
  assert app.url_map.url_for('get_post', id=1)=='/post/1'
  assert app.url_map.url_for('edit_post', id=1)=='/post/1'
  assert app.url_map.url_for('delete_post', id=1)=='/post/1'
output: from flask import Flask, request, jsonify
  from flask_sqlalchemy import SQLAlchemy
  
  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(100), nullable=False)
      content = db.Column(db.Text, nullable=False)
  
  @app.route('/post', 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'}), 201
  
  @app.route('/posts', methods=['GET'])
  def get_posts():
      posts = BlogPost.query.all()
      return jsonify([{'id': post.id, 'title': post.title, 'content': post.content} for post in posts])
  
  @app.route('/post/<int:id>', methods=['GET'])
  def get_post(id):
      post = BlogPost.query.get_or_404(id)
      return jsonify({'id': post.id, 'title': post.title, 'content': post.content})
  
  @app.route('/post/<int:id>', methods=['PUT'])
  def edit_post(id):
      post = BlogPost.query.get_or_404(id)
      data = request.get_json()
      post.title = data['title']
      post.content = data['content']
      db.session.commit()
      return jsonify({'message': 'Post updated'})
  
  @app.route('/post/<int:id>', methods=['DELETE'])
  def delete_post(id):
      post = BlogPost.query.get_or_404(id)
      db.session.delete(post)
      db.session.commit()
      return jsonify({'message': 'Post deleted'})