Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

276
Vistas
What is the difference between using flask run vs python app.py vs python -m flask run?

The following ways allows me to launch the Flask server.

Option 1:

set FLASK_APP = app.py
flask run

Option 2:

set FLASK_APP = app.py
python -m flask run

Option 3:

python app.py

What is the difference between using either of this?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

flask run

This one looks for an executable (called flask) on your PATH, the first one executes with a parameter run, which will make the flask helper run the application by calling FLASK_APP.

python -m flask run

This one looks for an executable called python on your PATH, the first one executes receiving -m as argument, which is supposed to run a module (flask) and then pass the parameter run to it. The key difference here, is that as it executes the first found executable on PATH, you can run a totally different Flask from the first one. You can also run a different python version's Flask.

python app.py

This calls the first python executable on PATH, and passes app.py as argument. It will make python run the app.py script, which may or may not have app.run() (This is what starts Flask). If you don't have anything inside app.py, it won't call Flask's server.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda