input: Write a function that creates 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.
  assert create_post(request_json={'title': 'First Post', 'content': 'This is the first post content'})==200
  assert get_posts()==[{'id': 1, 'title': 'First Post', 'content': 'This is the first post content'}]
  assert get_post(1)=={'id': 1, 'title': 'First Post', 'content': 'This is the first post content'}
  assert edit_post(1, request_json={'title': 'Updated Post', 'content': 'This is the updated content'})=={'id': 1, 'title': 'Updated Post', 'content': 'This is the updated content'}
  assert delete_post(1)=={'message': 'Post deleted'}
output: posts = []
  post_id_counter = 1
  
  def create_post(request_json):
      global post_id_counter
      new_post = {
          'id': post_id_counter,
          'title': request_json['title'],
          'content': request_json['content']
      }
      posts.append(new_post)
      post_id_counter += 1
      return 200
  
  def get_posts():
      return posts
  
  def get_post(post_id):
      for post in posts:
          if post['id'] == post_id:
              return post
      return None
  
  def edit_post(post_id, request_json):
      for post in posts:
          if post['id'] == post_id:
              post['title'] = request_json['title']
              post['content'] = request_json['content']
              return post
      return None
  
  def delete_post(post_id):
      global posts
      posts = [post for post in posts if post['id'] != post_id]
      return {'message': 'Post deleted'}