input: Write a function to create a web API using Python and Flask that returns the current date and time in the format "YYYY-MM-DD HH:MM:SS". The API should run locally and respond to requests at the endpoint '/datetime'.
  
  assert create_web_api() == 'from flask import Flask\nimport datetime\n\napp = Flask(__name__)\n\n@app.route(\'/datetime\')\ndef get_datetime():\n    return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")\n\nif __name__ == \'__main__\':\n    app.run()\n'
output: 
  from flask import Flask
  import datetime
  
  app = Flask(__name__)
  
  @app.route('/datetime')
  def get_datetime():
      return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
  
  if __name__ == '__main__':
      app.run()
  