input: Write a function that creates a Flask web server to serve a JSON object containing the current temperature for a city based on the city name provided in the request.
  
  from flask import Flask, request
  import requests
  import json
  
  app = Flask(__name__)
  
  @app.route('/getTemp', methods=['POST'])
  def get_temp():
      city = request.json['city']
      url = 'http://api.openweathermap.org/data/2.5/weather?q={}&APPID=xxxxxx'
      r = requests.get(url.format(city))
      weather = json.loads(r.text)
      return {'temperature': weather['main']['temp']}
  
  if __name__ == '__main__':
      app.run(debug=True)
  
  assert get_temp(request_containing('Madrid'))=={'temperature': 283.15}
  assert get_temp(request_containing('London'))=={'temperature': 285.5}
  assert get_temp(request_containing('New York'))=={'temperature': 282.6}
  assert get_temp(request_containing('Tokyo'))=={'temperature': 289.3}
  assert get_temp(request_containing('Sydney'))=={'temperature': 295.7}
output: def get_temp():
      city = request.json['city']
      url = 'http://api.openweathermap.org/data/2.5/weather?q={}&APPID=xxxxxx'
      r = requests.get(url.format(city))
      weather = json.loads(r.text)
      return {'temperature': weather['main']['temp']}