input: Write a function to design a web server using the Flask framework that provides the current temperature for a city when the city name is provided in the request. The function should return a JSON object containing the temperature.
  
  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 '<Flask 'xxxxxx'>' in str(app)
  assert 'temperature' in get_temp(city='London')
  assert 'temperature' in get_temp(city='Paris')
  assert 'temperature' in get_temp(city='Tokyo')
  assert 'temperature' in get_temp(city='New York')
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']}
  