-
-
Save parzibyte/f04c3ba6edaba2527b9132f6be6fec95 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Variables GET en Flask | |
https://parzibyte.me/blog | |
""" | |
from flask import Flask, request | |
app = Flask(__name__) | |
@app.route('/') | |
def hola(): | |
nombre = request.args.get("nombre") | |
if not nombre: | |
return "Hola, invitado" | |
else: | |
return "Hola, " + nombre | |
if __name__ == "__main__": | |
app.run(host='0.0.0.0', port=8000, debug=True) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment