Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created November 10, 2020 00:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/f04c3ba6edaba2527b9132f6be6fec95 to your computer and use it in GitHub Desktop.
Save parzibyte/f04c3ba6edaba2527b9132f6be6fec95 to your computer and use it in GitHub Desktop.
"""
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