Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from flask import Flask, render_template, request
- import requests
- app = Flask(__name__)
- @app.route('/index.html', methods=['GET'])
- def temperature():
- temp = requests.get('http://api.openweathermap.org/data/2.5/weather?q=Papine&APPID=edf527089b81fad23c7c1367deb728ec')
- textForm = temp.json()
- return render_template('index.html', hhhh=textForm)
- if __name__ == '__main__':
- app.run(debug=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement