Primer commit con datos

This commit is contained in:
2020-11-19 02:47:55 -03:00
parent b701f1e561
commit 5ff211c1db
7 changed files with 67 additions and 0 deletions

22
app.py Normal file
View File

@@ -0,0 +1,22 @@
from flask import Flask
from start import services
app = Flask(__name__)
app.config.from_object('start.settings')
@app.route('/currency')
def currency():
return services.currency.get(app.config['FOREX_KEY'])
@app.route('/weather')
def weather():
return services.weather.get('temuco', app.config['OPENWEATHERMAP_KEY'])
@app.route('/photos')
def photos():
return services.photos.get(app.config['UNSPLASH_KEY'])
@app.route('/')
def hello_world():
return 'Hello, World!'