Pasos para instalar Flask:
- Abre tu terminal (o línea de comandos).
- Utiliza
pip
(opip3
si estás usando Python 3) para instalar Flask. - Ejecuta el siguiente comando:
pip install Flask
Una vez que la instalación se haya completado sin errores, Flask estará listo para ser utilizado en tu sistema.
Probando Flask:
Crear código main.py
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return '¡Hola, mundo!'
if __name__ == '__main__':
app.run()
Ejecutar:
python main.py
Abrir en el navegador web:
http://localhost:5000
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.