Skip to content

Instantly share code, notes, and snippets.

@avielb
Last active June 30, 2019 15:40
Show Gist options
  • Save avielb/e3aa82cb337ed2da05ff5e0e4ba3961b to your computer and use it in GitHub Desktop.
Save avielb/e3aa82cb337ed2da05ff5e0e4ba3961b to your computer and use it in GitHub Desktop.
import requests
myrequest = requests.get("https://free.currencyconverterapi.com/api/v6/convert?q=USD_ILS&compact=n&apiKey=72a1f59a5bf27c222c80")
from flask import Flask, redirect, request
app = Flask(__name__)
@app.route('/whatismyname', methods = ['GET', 'POST', 'DELETE'])
def hello():
if request.method == 'GET':
return '<font size=7>My name is Aviel</font>'
elif request.method == 'POST':
return 'creating your name'
if __name__ == "__main__":
app.run(host="0.0.0.0", port=5001, debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment